/* Crearia para Makers · herramientas paramétricas (makers.crearia.app/herramientas) */
.mkh-hero { padding-top: clamp(24px, 5vw, 56px); padding-bottom: 8px; }
.mkh-hero h1 { margin-block: 10px 12px; font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.4rem); line-height: 1.06; }
.mkh-hero .lead { max-width: 62ch; }
.mkh-migas { font-size: var(--cr-text-sm); color: var(--cr-text-muted); display: flex; gap: 6px; flex-wrap: wrap; }
.mkh-migas a { color: inherit; }
.mkh-gratis { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 12px; border-radius: 999px; font-size: var(--cr-text-sm); font-weight: 600; background: var(--cr-glass-bg); border: 1px solid var(--cr-border); }
.mkh-gratis b { color: var(--cr-purple-500, #9e60fe); }

.mkh-app { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 22px; align-items: start; margin-top: 22px; }
.mkh-panel { padding: 20px; border-radius: var(--cr-radius-lg, 22px); display: grid; gap: 16px; position: sticky; top: 96px; max-height: calc(100vh - 112px); overflow: auto; }
.mkh-panel fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.mkh-panel legend { font-family: var(--cr-font-display); font-weight: 700; font-size: var(--cr-text-lg); padding: 0; margin-bottom: 6px; }
.mkh-panel label { display: grid; gap: 4px; font-size: var(--cr-text-sm); font-weight: 600; }
.mkh-panel label small { font-weight: 500; color: var(--cr-text-muted); }
.mkh-panel label > span small { margin-left: 4px; }
.mkh-panel input[type="number"], .mkh-panel input[type="text"], .mkh-panel select, .mkh-panel textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--cr-border);
  background: var(--cr-surface, rgba(255,255,255,.7)); color: var(--cr-text); font: inherit; font-weight: 500;
}
.mkh-panel textarea { min-height: 110px; resize: vertical; }
.mkh-panel input[type="range"] { width: 100%; accent-color: #7f42eb; }
.mkh-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mkh-tres { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.mkh-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.mkh-seg label { position: relative; display: inline-flex; cursor: pointer; }
.mkh-seg input { position: absolute; opacity: 0; pointer-events: none; }
.mkh-seg span { padding: 8px 12px; min-height: 40px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--cr-border); background: var(--cr-glass-bg); font-weight: 600; font-size: var(--cr-text-sm); }
.mkh-seg input:checked + span { background: linear-gradient(135deg, #b886fe, #7f42eb); border-color: transparent; color: #fff; }
.mkh-seg input:focus-visible + span { box-shadow: var(--cr-focus); }
.mkh-check { display: flex !important; align-items: center; gap: 8px; }
.mkh-check input { width: 18px; height: 18px; accent-color: #7f42eb; }
.mkh-panel details { border-top: 1px solid var(--cr-border); padding-top: 12px; }
.mkh-panel summary { cursor: pointer; font-weight: 700; font-size: var(--cr-text-sm); }
.mkh-panel details > div { display: grid; gap: 10px; margin-top: 10px; }

.mkh-res { display: grid; gap: 16px; min-width: 0; }
.mkh-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; padding: 16px 18px; border-radius: var(--cr-radius-lg, 22px); }
.mkh-datos div { display: grid; gap: 2px; }
.mkh-datos dt { font-size: var(--cr-text-xs); color: var(--cr-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.mkh-datos dd { margin: 0; font-weight: 700; font-family: var(--cr-font-display); }
.mkh-avisos { padding: 12px 16px; border-radius: 14px; background: rgba(229, 72, 77, .1); border: 1px solid rgba(229, 72, 77, .35); font-size: var(--cr-text-sm); }
.mkh-avisos p { margin: 0; }
.mkh-avisos p + p { margin-top: 6px; }
.mkh-hojas { display: grid; gap: 16px; }
.mkh-hoja { margin: 0; padding: 14px; border-radius: var(--cr-radius-lg, 22px); background: var(--cr-glass-bg); border: 1px solid var(--cr-border); }
.mkh-hoja figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: var(--cr-text-sm); font-weight: 600; }
.mkh-hoja-svg { display: block; width: 100%; height: auto; max-height: 72vh; border-radius: 10px; }
.mkh-hoja-svg, .mkh-3d svg, .mkh-ico { stroke: none; stroke-width: 0; }
.mkh-hoja-svg path, .mkh-3d polygon { stroke-linecap: butt; stroke-linejoin: miter; vector-effect: non-scaling-stroke; }
.v-hoja { fill: #f6efe4; stroke: #cdbb9f; stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.v-pieza { fill: #ddb98a; stroke: none; }
.v-grabado { fill: #6b4120; stroke: none; }
.v-marcado { fill: none; stroke: #2f5bd3; stroke-width: 1; }
.v-corte { fill: none; stroke: #e0262b; stroke-width: 1.2; }
:root[data-theme="dark"] .v-hoja { fill: #2a2236; stroke: #5b4d70; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .v-hoja { fill: #2a2236; stroke: #5b4d70; } }

.mkh-3d { padding: 14px; border-radius: var(--cr-radius-lg, 22px); display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: center; }
.mkh-3d svg { width: 100%; height: auto; max-height: 160px; }
.mkh-3d p { margin: 0; font-size: var(--cr-text-sm); color: var(--cr-text-muted); }
.c3-a { fill: #c99a62; stroke: #7a5230; stroke-width: 1; }
.c3-b { fill: #ddb98a; stroke: #7a5230; stroke-width: 1; }
.c3-c, .c3-hueco { fill: #ecd2ad; stroke: #7a5230; stroke-width: 1; }
.c3-dentro { fill: #9c7146; stroke: #7a5230; stroke-width: 1; }
.c3-tapa { filter: brightness(.95); }

.mkh-consejos { padding: 18px 20px; border-radius: var(--cr-radius-lg, 22px); font-size: var(--cr-text-sm); }
.mkh-consejos h2 { font-size: var(--cr-text-lg); margin: 0 0 8px; }
.mkh-consejos ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--cr-text-muted); }

/* Catálogo de herramientas */
.mkh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-top: var(--cr-gap-block, 28px); }
.mkh-card { position: relative; display: grid; gap: 8px; align-content: start; padding: 20px; border-radius: var(--cr-radius-lg, 22px); color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s; }
a.mkh-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgba(40, 10, 90, .55); }
.mkh-card img, .mkh-card .mkh-ico { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 14px; background: #f6efe4; display: block; }
.mkh-card h3 { margin: 4px 0 0; font-family: var(--cr-font-display); font-size: var(--cr-text-xl, 1.3rem); }
.mkh-card p { margin: 0; color: var(--cr-text-muted); font-size: var(--cr-text-sm); }
.mkh-card .mkh-coste { font-weight: 700; color: var(--cr-purple-500, #9e60fe); font-size: var(--cr-text-sm); }
.mkh-card .mkh-badge { position: absolute; top: 12px; right: 12px; padding: 4px 10px; border-radius: 999px; background: linear-gradient(135deg, #b886fe, #7f42eb); color: #fff; font-size: var(--cr-text-xs); font-weight: 700; }
.mkh-card.mkh-pronto { opacity: .85; }
.mkh-card.mkh-pronto .mkh-badge { background: #6c6480; }

@media (max-width: 900px) {
  .mkh-app { grid-template-columns: 1fr; }
  .mkh-panel { position: static; max-height: none; }
}
@media (max-width: 480px) {
  .mkh-tres { grid-template-columns: 1fr 1fr; }
  .mkh-3d { grid-template-columns: 1fr; }
}
