@font-face {
  font-family: Inter;
  src: url("/assets/frappe/css/fonts/inter/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-ui: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --canvas: #faf9f5;
  --surface-soft: #f5f5ef;
  --primary: var(--teal);
  --primary-hover: #073f39;
  --on-primary: #fff;
  --radius-lg: 10px;
  --public-max: 1750px;
  --public-gutter: clamp(20px,5vw,86px);
  --ink: #192b26;
  --subtle: #52615a;
  --line: #dce1d9;
  --line-strong: #aab7ae;
  --soft: #eff3ed;
  --paper: #fff;
  --rail: #243732;
  --teal: #07534b;
  --tint: #e1ede6;
  --danger: #a9353e;
  --danger-bg: #faedef;
  --focus: #167566;
  --border: 1px solid var(--line);
  --radius: 6px;
  --control: 34px;
  --icon: 17px;
  --dialog-pad: 24px;
  --side: clamp(184px, 16vw, 216px);
  --project-cols: minmax(0,1fr) 92px minmax(175px,22%) 40px;

}
html.ct-workshop {font:14px/1.5 var(--font-ui);color:var(--ink);background:var(--paper)}

/* Componentes y espacio de trabajo. Las reglas técnicas del CAD se aplican
   únicamente a las páginas de la aplicación. */
@scope (.ct-workshop) {
* {box-sizing:border-box}
body,h1,h2,h3,p {margin:0}
[hidden],#cad[hidden] {display:none!important}
button,input,select {font:inherit;color:inherit}
button {
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:var(--control);padding:6px 12px;border:1px solid var(--line-strong);
  border-radius:var(--radius);background:var(--paper);
  font-size:13px;font-weight:500;line-height:1.3;cursor:pointer;
}
button:hover:not(:disabled) {background:var(--soft);border-color:#9da8af}
button:disabled {opacity:.42;cursor:default}
:where(button,input,select,summary,a):focus-visible {outline:2px solid var(--focus);outline-offset:2px}
button[aria-pressed=true],button.active {color:var(--teal);background:var(--tint)}
button.icon-only {width:var(--control);padding:0;flex:none}
button svg,.workshop-nav svg,h3 svg,#dialog-icon svg,.design-open>svg {
  width:var(--icon);height:var(--icon);flex:none;fill:none;stroke:currentColor;
  stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;
}
h1,h2,h3 {line-height:1.25;font-weight:570;letter-spacing:-.026em}
h2 {font-size:19px}h3 {font-size:14px}
small,.muted,time {color:var(--subtle);font-size:12px}
a {color:var(--teal);text-underline-offset:3px}
.error {color:var(--danger)}
label {display:grid;gap:5px;min-width:0;margin:10px 0;color:var(--subtle);font-size:12px;font-weight:500}
input,select {
  width:100%;min-width:0;min-height:var(--control);padding:6px 9px;
  border:1px solid var(--line-strong);border-radius:var(--radius);
  background:var(--paper);color:var(--ink);font-size:13px;font-weight:400;
}
input[type=number],time,#rev,.revision,#drawing-size,#selection-size,.count {font-variant-numeric:tabular-nums}
input[type=checkbox],input[type=range] {accent-color:var(--teal)}
input[type=checkbox] {width:16px;height:16px;min-height:0;margin:0;cursor:pointer}
input[type=range] {min-height:22px;padding:0;border:0;cursor:pointer}
input:disabled,select:disabled {background:var(--soft);color:var(--subtle)}
input[type=color] {padding:3px 5px}
label:has(>input[type=checkbox]) {display:flex;align-items:center;gap:8px}
input[type=file] {padding:5px}
input::file-selector-button {margin-right:9px;padding:4px 9px;border:var(--border);border-radius:2px;background:var(--soft);color:var(--ink);font:inherit;cursor:pointer}
.tools,.end,.action-row,.catalogtools,.homehead,header,nav,.title-line,.editor-tools {display:flex;align-items:center;gap:8px}
.end {justify-content:flex-end}.action-row,.catalogtools,.homehead {flex-wrap:wrap}

/* Taller, archivos y catálogos */
#home {--compact-width:56px;display:grid;grid-template-columns:var(--side) minmax(0,1fr);min-height:100dvh}
#home.nav-compact {grid-template-columns:var(--compact-width) minmax(0,1fr)}
#home .workshop-side {--nav-pad:10px;position:sticky;z-index:2;top:0;align-self:start;height:100dvh;min-height:0;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:22px;padding:18px var(--nav-pad) 10px;border:0;border-right:var(--border);background:var(--surface-soft)}
.nav-brand {display:flex;align-items:center;min-height:46px;padding-inline:5px}
#nav-toggle {position:absolute;inset-inline-end:0;top:-1px;transform:translate(50%,-50%);width:26px;height:26px;min-height:0;padding:0;border:1px solid var(--line-strong);border-radius:50%;background:var(--paper);color:var(--subtle)}
#nav-toggle::after {content:"";position:absolute;inset:-5px;border-radius:50%}
#nav-toggle svg {width:14px;height:14px;stroke-width:1.8}
#nav-toggle[aria-expanded=true] svg {transform:rotate(180deg)}
#nav-toggle:hover,#nav-toggle:focus-visible {color:var(--teal);border-color:var(--teal);background:var(--tint)}
@media(pointer:coarse){#nav-toggle::after {inset:-9px}}
#workshop-links {display:grid;align-content:start;overflow-y:auto;min-height:0;gap:3px;padding:3px}
#workshop-links a {display:inline-flex;align-items:center;text-decoration:none;font-size:13px;font-weight:500;border-radius:var(--radius);width:100%;justify-content:flex-start;min-height:38px;padding:7px 8px;gap:10px;background:transparent;color:var(--subtle);text-align:left}
#workshop-links a:hover,#nav-profile:hover {background:var(--soft);color:var(--ink)}
#workshop-links a.active,#nav-profile[aria-current=page] {background:var(--tint);color:var(--teal);font-weight:600;box-shadow:inset 2px 0 var(--teal)}
.nav-user {position:relative;margin:auto calc(0px - var(--nav-pad)) 0;border-top:var(--border);padding:16px var(--nav-pad) 0;min-width:0}
#nav-profile {display:flex;align-items:center;gap:9px;padding:6px;border-radius:var(--radius);text-decoration:none;color:var(--ink);min-height:42px}
.user-initials {display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:50%;font-size:12px;font-weight:650;background:var(--tint);color:var(--teal)}
.account-controls {position:relative;display:flex;align-items:center;gap:3px}
.account-controls #nav-profile {min-width:0;flex:1}
#session-toggle {border:0;background:transparent;color:var(--ink);min-width:32px;min-height:32px;padding:2px;font-weight:700;font-size:18px}
#session-toggle:hover,#session-toggle[aria-expanded=true] {background:var(--tint)}
#session-actions {position:absolute;z-index:12;bottom:calc(100% + 5px);left:0;min-width:164px;padding:4px;background:var(--paper);border:var(--border);border-radius:6px;box-shadow:0 4px 18px #132a2920}
#session-actions button {display:flex;align-items:center;text-align:left;justify-content:start;gap:9px;width:100%;border:none;background:transparent}
#session-actions button:hover,#session-actions button:focus-visible {background:var(--tint)}
#session-actions svg {width:16px;height:16px}
#session-actions p {font-size:12px;margin:4px 7px}
#home.nav-compact .account-controls {flex-direction:column-reverse}
.nav-user-text {min-width:0}
.nav-user-text strong,.nav-user-text small {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav-user-text strong {font-size:13px;font-weight:600}
.nav-user-text small {font-size:11px}
#home.nav-compact .workshop-side {--nav-pad:5px}
#home.nav-compact .nav-brand {justify-content:center}
#home.nav-compact .ct-brand-name,#home.nav-compact #workshop-links .btn-label,#home.nav-compact .nav-user-text {display:none}
#home.nav-compact .nav-brand {padding-inline:0}
#home.nav-compact #workshop-links a,#home.nav-compact #nav-profile {justify-content:center;padding-inline:0}
.personal-profile {max-width:34rem;margin-bottom:1rem}
.personal-profile input[readonly] {background:var(--soft);color:var(--subtle)}
.personal-profile [role=status]:not(:empty) {margin:.6rem 0;color:var(--teal)}
.library {min-width:0;width:100%;max-width:1450px;margin:0 auto;padding:clamp(32px,4vw,58px) clamp(22px,4.5vw,68px)}
.homehead {justify-content:space-between;align-items:flex-end;gap:15px;margin-bottom:32px}
.homehead small {display:block;margin-bottom:8px;color:var(--subtle);font-size:12px;font-weight:450}
.homehead h1 {font-size:clamp(27px,2.4vw,35px);font-weight:550;letter-spacing:-.045em}
.homehead .tools {gap:8px}
@media(max-width:650px) {
  .homehead .design-actions {flex-basis:100%}
}
.homehead .tools:not(:has(>button:not([hidden]))) {display:none}
.project-columns {display:none}
.project-columns:has(+ #projects:not([hidden],.file-grid)>.designcard) {display:grid}
.project-columns,.designcard {grid-template-columns:var(--project-cols);align-items:center;column-gap:16px;padding-inline:14px}
.project-columns {min-height:34px;border-block:var(--border);background:#f6f7f7;color:var(--subtle);font-size:12px;font-weight:550}
#projects {display:block}
.designcard {position:relative;display:grid;min-width:0;min-height:58px;border-bottom:var(--border)}
.designcard:hover,.designcard:focus-within {background:#f6f8f8}
.design-open {
  display:grid;grid-column:1/4;grid-template-columns:subgrid;column-gap:inherit;grid-row:1;align-self:stretch;align-items:center;
  justify-content:stretch;justify-items:start;padding:9px 0;border:0;border-radius:0;
  background:transparent;color:var(--ink);text-align:left;
}
.design-open:hover:not(:disabled) {background:transparent}
.design-open>svg {grid-column:1;grid-row:1;width:17px;height:17px;color:#637078}
.design-open strong {grid-column:1;grid-row:1;min-width:0;padding-left:30px;overflow-wrap:anywhere;font-size:14px;font-weight:530;line-height:1.45}
.design-meta {display:contents}
.design-meta>small {grid-column:2;grid-row:1}.design-meta>time {grid-column:3;grid-row:1}
.design-meta>small,.design-meta>time {white-space:nowrap;font-size:12px;font-weight:430}
.revision,#rev {color:var(--subtle);white-space:nowrap}
.card-trash {grid-column:4;grid-row:1;justify-self:end;color:var(--subtle);background:transparent;border-color:transparent}
.card-trash:hover:not(:disabled) {background:var(--danger-bg);border-color:transparent;color:var(--danger)}
#projects>p {padding-block:22px;border-top:var(--border)}
#home-status {margin-top:14px}
.catalogtools {margin-bottom:16px}.catalogtools select {width:auto;max-width:100%}
.cataloggrid {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(270px,100%),1fr));gap:20px}
.templatecard {display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding-bottom:16px}
.template-preview {display:grid;place-items:center;width:100%;height:150px;padding:12px;margin-bottom:12px;border:var(--border);border-radius:var(--radius);background:var(--soft)}
.template-preview svg {display:block;width:100%;height:100%;min-height:0}
.templatecard small {font-size:12px}.templatecard h2 {margin:7px 0 12px}
.templatecard p {margin:0 0 12px}.templatecard button {margin-top:auto}
.builder {display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:24px}
.builder>div,.builderpreview {min-width:0;border-top:var(--border);padding:16px 0}
.builderpreview {align-self:start;position:sticky;top:16px}
.builder h3 {margin:18px 0 8px}.builderpreview h3 {margin-top:0}
.fieldrow {display:flex;align-items:end;flex-wrap:wrap;gap:8px}.fieldrow>label {flex:1;min-width:68px}
.template-code {flex:0 1 auto;min-width:7rem;display:grid;gap:5px;margin:10px 0}
.template-code dt {color:var(--subtle);font-size:12px;font-weight:500}
.template-code dd {display:flex;align-items:center;min-height:var(--control);margin:0;font-variant-numeric:tabular-nums}
.panelrow {padding:8px 0;margin:8px 0;border-top:var(--border)}
summary {font-size:12px;color:var(--teal);cursor:pointer}
.previewcanvas {position:relative;height:300px;margin:12px 0;border:var(--border);background:var(--soft);overflow:hidden}
.previewcanvas canvas,.previewcanvas svg {display:block;width:100%;height:100%;touch-action:none}
.builder .end {margin-top:18px}
.admin-tabs {align-items:stretch;flex-wrap:wrap;gap:12px;border-bottom:var(--border);margin:0 0 22px}
.admin-tabs button {margin-bottom:-1px;padding:7px 2px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--subtle)}
.admin-tabs button.active {color:var(--ink);border-bottom-color:var(--teal);font-weight:600}
.master-head {display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.master-list {border-top:var(--border)}.master-list>p {padding-block:15px}
.master-row {width:100%;min-height:47px;justify-content:flex-start;gap:14px;border:0;border-radius:0;border-bottom:var(--border);padding:8px 12px;text-align:left}
.master-row strong {font-weight:530}.master-row small {margin-left:auto;text-align:right}
.master-row>svg {margin-left:8px;color:var(--subtle);width:14px}.swatch {width:16px;height:3px;flex:none}

/* Cabecera del documento y superficie de dibujo */
#editor {height:100dvh;min-height:0}
.stage {display:flex;flex-direction:column;height:100%;min-width:0;min-height:0}
.doc {display:flex;align-items:center;flex:none;gap:10px;min-height:58px;padding-inline:10px;border-bottom:var(--border);background:var(--paper)}
.identity {min-width:0;max-width:clamp(175px,26vw,440px)}
.identity>small {display:block;overflow:hidden;color:var(--subtle);font-size:11px;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}
.title-line {gap:5px}.identity h1 {min-width:0;overflow:hidden;font-size:15px;font-weight:590;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
.title-line button {--control:25px;color:var(--subtle);border-color:transparent}.title-line button svg {width:14px;height:14px}
#rev {flex:none;padding-left:6px;border-left:var(--border);font-size:11px;font-weight:450}
#back,.editor-tools .icon-only {border-color:transparent}
#views {align-self:stretch;align-items:stretch;margin-inline:auto;gap:3px}
#views button {position:relative;padding:7px 11px;border:0;border-radius:0;background:transparent;color:var(--subtle);white-space:nowrap}
#views [data-view="fold"]:disabled {pointer-events:none}
#views button:hover:not(:disabled) {background:var(--soft)}
#views button.active {color:var(--ink);font-weight:600}
#views button.active::after {position:absolute;right:8px;bottom:0;left:8px;height:2px;background:var(--teal);content:""}
.editor-tools {justify-content:flex-end;flex:none;gap:3px}
.unit-control {display:flex;align-items:center;margin:0 4px;gap:4px}
.unit-control>span {position:absolute;clip-path:inset(50%)}.unit-control select {width:auto;min-height:30px}
#workarea {position:relative;display:flex;flex:1;min-width:0;min-height:0}
#cadbar {display:flex;flex-direction:column;align-items:center;flex:none;width:48px;gap:5px;padding:8px 4px;overflow:auto;scrollbar-width:thin;scrollbar-color:#687278 var(--rail);background:var(--rail)}
.cadgroup {display:grid;flex:none;gap:1px}
.cadgroup+.cadgroup {padding-top:5px;border-top:1px solid #586064}
.cadgroup button {width:36px;height:34px;min-height:0;padding:0;border:0;border-radius:3px;background:transparent;color:#d4dcdf}
.cadgroup button:hover:not(:disabled) {background:#384349;color:#fff}
.cadgroup button[aria-pressed=true] {background:#435156;color:white;box-shadow:inset 2px 0 #98d6d4}
.cadgroup button:focus-visible {outline-color:#b4e7e5;outline-offset:-1px}
.cadgroup svg {width:19px;height:19px}
#workspace {position:relative;flex:1;min-width:0;overflow:hidden;background:var(--surround-color,#f0f2f2)}
#cadbar:not([hidden])+#workspace {background-color:var(--canvas-color,#fafbfb);background-image:radial-gradient(var(--grid-color,#cbd1d2) .6px,transparent .8px);background-size:20px 20px}
#cad,#model,#model canvas {position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:none}
#model {background:radial-gradient(ellipse at 48% 38%,#fafbf9 2%,#e6e9e7 61%,#c9cfce)}
.model-error,#empty {position:absolute;left:15%;right:15%;top:40%;text-align:center;color:var(--subtle)}
#viewtools,#selection-size,#xy {position:absolute;display:flex;align-items:center;gap:3px;border:var(--border);border-radius:var(--radius);background:var(--paper)}
#viewtools {bottom:12px;left:12px;padding:2px;max-width:calc(100% - 24px)}
#viewtools button {min-height:30px;border:0;background:transparent;padding:4px 7px;font-size:12px}
#viewtools button:hover {background:var(--soft)}#viewtools button[aria-pressed=true] {color:var(--teal);background:var(--tint)}
#viewtools .icon-only {width:28px}
#selection-size {top:10px;left:10px;max-width:calc(100% - 20px);flex-wrap:wrap;gap:1px 12px;padding:4px 9px;font-size:12px;pointer-events:none}
#selection-metrics {display:contents}
#selection-position {display:flex;align-items:center;gap:4px;flex-wrap:wrap;max-width:100%;pointer-events:auto}
#selection-position label {display:inline-flex;align-items:center;gap:3px;margin:0;font-weight:500}
#selection-position input {width:7.5ch;min-width:0;height:22px;min-height:0;padding:0 2px;border-color:var(--line);border-radius:3px;text-align:right;font-size:12px;line-height:1.25;font-variant-numeric:tabular-nums}
@supports (field-sizing:content) {
  #selection-position input {field-sizing:content;width:auto;min-width:6.5ch;max-width:14ch}
}
#position-anchor,#position-unit {color:var(--subtle)}
#selection-position button {width:22px;height:22px;min-height:0;padding:0}
#selection-position button svg {width:14px;height:14px}
#selection-size strong,.length-edit {color:var(--teal);font-weight:550}
.length-edit {pointer-events:auto;min-height:24px;padding:0;border:0;border-bottom:1px dotted currentColor;border-radius:0}
#xy {right:12px;bottom:12px;padding:4px;gap:6px}
#xy label,.inline {display:flex;align-items:center;gap:4px;margin:0}
#xy input {width:64px;min-height:28px;padding:3px 5px}#xy button {min-height:28px}
footer {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:3px 12px;min-height:26px;padding:3px 12px;border-top:var(--border);color:var(--subtle);font-size:11px}
#updated {margin-left:auto}#updated time {font-size:inherit}#drawing-size {color:var(--teal);font-weight:550}#drawing-size:empty {display:none}

/* Inspector: cada fila de acción mantiene su nombre e icono. */
#properties {display:flex;flex:none;flex-direction:column;width:284px;max-width:34vw;min-height:0;border-left:var(--border);background:var(--paper);overflow:hidden}
#inspect {display:grid;align-content:start;flex:1 1 auto;min-height:0;overflow:auto;scrollbar-width:thin;overscroll-behavior:contain}
#inspect>.section:last-child {border-bottom:0}
#inspector-export {display:flex;align-items:center;justify-content:space-between;flex:none;gap:8px;padding:6px 12px;border-top:var(--border)}
#inspector-export h3 {font-size:13px;font-weight:640}
.export-formats {display:inline-flex;align-items:stretch;min-width:0}
.export-formats button {min-width:0;min-height:32px;margin:0;padding:4px 9px;border-radius:0;font-size:12px;white-space:nowrap}
.export-formats button+button {margin-left:-1px}
.export-formats button:first-child {border-radius:var(--radius) 0 0 var(--radius)}
.export-formats button:last-child {border-radius:0 var(--radius) var(--radius) 0}
.export-formats button:focus-visible {z-index:1;outline-offset:-2px}
.section {min-width:0;padding:15px 17px 14px;border-bottom:var(--border)}
.section h3 {display:flex;align-items:center;gap:8px;margin-bottom:10px;font-size:13px;font-weight:640;letter-spacing:-.015em}
.section h3 svg {width:15px;height:15px;color:var(--subtle)}
.section p {margin:5px 0 9px}.section p:last-child {margin-bottom:0}
.section>button,.section>.action-row>button {display:flex;justify-content:flex-start;width:100%;min-height:31px;margin:1px 0;padding:5px 4px;border:1px solid transparent;background:transparent;border-radius:3px;font-size:12px;font-weight:450}
.section>button:hover:not(:disabled),.section>.action-row>button:hover:not(:disabled) {background:var(--soft);border-color:transparent}
.section>button svg,.section>.action-row>button svg {color:var(--subtle);width:16px;height:16px}
.section>button[aria-pressed=true],.section>.action-row>button[aria-pressed=true] {background:var(--tint);color:var(--teal)}
.section .full-action {justify-content:center;margin-top:8px}
.section>button.primary {justify-content:center}
.section>button.primary svg {color:inherit}
.section .action-row {display:grid;gap:0}
.instance-actions {gap:5px}
.instance-actions button[aria-disabled=true] {background:var(--soft);border-color:var(--line);color:var(--subtle);cursor:default}
@media(pointer:coarse){.instance-actions {--control:44px}}
.section a {display:inline-block;font-size:12px;font-weight:500}
.section label:last-child {margin-bottom:0}
.camera-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border:var(--border);border-radius:var(--radius);overflow:hidden}
.camera-grid button {display:flex;flex-direction:column;gap:4px;min-width:0;padding:6px 0;border:0;border-inline-end:var(--border);border-radius:0;font-size:10px;font-weight:450}
.camera-grid button:last-child {border-inline-end:0}.camera-grid button svg {width:17px;height:17px}
.camera-grid button:focus-visible {outline-offset:-2px}
#fold-angle {margin:1px 0 0}
.board-setting {display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0}
.board-setting select {width:55%;min-width:0}.board-setting:has(input[type=checkbox]) {justify-content:flex-start}
.count {font-size:25px;font-weight:530;letter-spacing:-.045em}
.scope-switch {display:flex;gap:0;margin:0 0 12px;border-bottom:var(--border)}
.scope-switch button {flex:1;margin:0 0 -1px;padding:5px 7px;min-height:31px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--subtle);font-size:12px}
.scope-switch button[aria-pressed=true] {color:var(--ink);border-bottom-color:var(--teal);font-weight:590}
.rect-fields,#fields.two-cols {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:12px}
.rect-fields {margin-top:12px}.rect-fields label,#fields.two-cols label {margin:0}
.circle-fields label:first-child {grid-column:1/-1}
.rect-fields button {grid-column:1/-1;justify-self:end}
.legend {display:flex;flex-wrap:wrap;gap:5px 10px}.legend {margin:7px 0;font-size:11px}
.legend-type {display:inline-flex;align-items:center;gap:4px}.legend-type .stroke-sample {width:28px}
.hit {fill:none;stroke:transparent;stroke-width:11;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke;cursor:pointer}
.edge {fill:none;pointer-events:none;vector-effect:non-scaling-stroke}
#cad {user-select:none}
#cad:focus {outline:none}
.hit.in-window {stroke:var(--selection-color,#007b98);stroke-width:calc(var(--stroke-width,1.4px) + var(--selection-extra,1.6px))}
.tonal-pattern > path:not(.hit) {stroke-width:calc(var(--pattern-width) * var(--cad-inverse-scale,1))}
.tonal-pattern:is(.selected,:has(> .in-window)) > path:not(.hit) {stroke:var(--tonal-ink);stroke-width:calc((var(--pattern-width) + var(--selection-extra,1.6px)) * var(--cad-inverse-scale,1))}
.tonal-pattern > .hit.in-window {stroke:transparent;stroke-width:11}
.selection-window {fill:color-mix(in srgb,var(--selection-color,#007b98) 10%,transparent);stroke:var(--selection-color,#007b98);stroke-width:1;stroke-dasharray:5 3;vector-effect:non-scaling-stroke}
#cad:is(.pan-tool,.space-pan) {cursor:grab}
#cad:is(.pan-tool,.space-pan) * {cursor:inherit}
#cad.panning,#cad.panning * {cursor:grabbing}
.measurement-line {fill:none;stroke:var(--teal);stroke-width:1;vector-effect:non-scaling-stroke}
.measurement-label {font-size:11px;font-weight:500;fill:var(--teal);stroke:var(--paper);stroke-width:2px;paint-order:stroke}
#cad.measuring #precision-snap-label {font-weight:450}
#cad.measuring #snap-contact {stroke-width:1}
.measure-value {fill:var(--teal);stroke:var(--paper);paint-order:stroke;font-weight:600}
.endpoint {outline:none}
.endpoint-hit {fill:transparent;stroke:none;pointer-events:all}
.open-point,.circle-center {pointer-events:none;vector-effect:non-scaling-stroke}
.open-point {r:calc(var(--open-point-diameter,5px) * var(--cad-inverse-scale,1) / 2);fill:var(--canvas-color,#fafbfb);stroke:var(--open-point-color,#a56829);stroke-width:var(--open-point-width,.75px)}
.open-point.current {fill:var(--open-point-color,#a56829)}
.circle-center {r:calc(var(--circle-center-diameter,4px) * var(--cad-inverse-scale,1) / 2);fill:none;stroke:var(--circle-center-color,#79736a);stroke-width:var(--circle-center-width,.65px)}
.endpoint-start {r:calc(var(--stroke-start-diameter,5px) / 2);fill:var(--canvas-color,#fafbfb);stroke:var(--stroke-start-color,var(--selection-color));stroke-width:var(--stroke-start-width,.85px)}
.endpoint-leader {fill:none;stroke:var(--stroke-end-color,var(--selection-color));stroke-width:min(1px,var(--stroke-end-width,.85px));stroke-dasharray:1 2}
.endpoint-finish {fill:transparent;stroke:var(--stroke-end-color,var(--selection-color));stroke-width:var(--stroke-end-width,.85px);stroke-linecap:round;stroke-linejoin:round}
.endpoint:is(:focus-visible,:hover,.current) .endpoint-hit {stroke:var(--stroke-start-color,var(--selection-color));stroke-width:var(--stroke-start-width,.85px);stroke-dasharray:1 2}
.endpoint[data-end="-1"]:is(:focus-visible,:hover,.current) .endpoint-hit {stroke:var(--stroke-end-color,var(--selection-color));stroke-width:var(--stroke-end-width,.85px)}
.endpoint[data-extend-id] {cursor:grab}
.endpoint {cursor:crosshair}.drafting,.drafting .hit {cursor:crosshair}
.move-base-point {r:calc(var(--move-base-diameter,5px) * var(--cad-inverse-scale,1) / 2);fill:var(--canvas-color,#fafbfb);stroke:var(--move-base-color,#58686e);stroke-width:var(--move-base-width,.75px);vector-effect:non-scaling-stroke;pointer-events:none}
.cadmark {fill:#ffebc0;stroke:#a15308;stroke-width:1.5;pointer-events:none}.cadmark.current {fill:#ffb44d;stroke:#7e3300;stroke-width:2}
.draft-line {fill:none;stroke:var(--draft-line-color,#607078);stroke-width:var(--draft-line-width,.75px);stroke-dasharray:3 3;vector-effect:non-scaling-stroke;pointer-events:none}
[data-draft-line-pattern="solid"] .draft-line {stroke-dasharray:none}
[data-draft-line-pattern="dotted"] .draft-line {stroke-dasharray:.1 3;stroke-linecap:round}
.draft-point {r:calc(var(--draft-point-diameter,5px) * var(--cad-inverse-scale,1) / 2);fill:var(--canvas-color,#fafbfb);stroke:var(--draft-point-color,#58686e);stroke-width:var(--draft-point-width,.75px);vector-effect:non-scaling-stroke;pointer-events:none}
.rubber {fill:none;stroke:var(--teal);stroke-width:1.5;stroke-dasharray:5 3;pointer-events:none}
#cad text:not(.dimension-label) {pointer-events:none}.dimension-label {cursor:pointer}
.ghost-edge {fill:none;stroke:var(--selection-color,#007b98);stroke-width:calc(var(--stroke-width,1.4px) + var(--selection-extra,1.6px));stroke-dasharray:5 3;vector-effect:non-scaling-stroke}
#cad:has(.drag-ghost),#cad:has(.drag-ghost) * {cursor:grabbing}#cad:not(.drafting,.space-pan,.pan-tool,.panning) [data-rect-hit] {cursor:pointer}
.bridge-targets .hit {cursor:crosshair}

/* Diálogos y ayudas del taller */
dialog {width:min(448px,calc(100% - 28px));max-height:min(88dvh,850px);margin:auto;padding:0;border:1px solid var(--line-strong);border-radius:6px;background:var(--paper);color:var(--ink);box-shadow:0 12px 38px #1b24262b}
dialog::backdrop {background:#17202759}
dialog:has(#fields.two-cols) {width:min(550px,calc(100% - 28px))}
#form {display:flex;flex-direction:column;max-height:inherit}
.dialog-head {display:flex;align-items:center;flex:none;gap:10px;padding:15px var(--dialog-pad);border-bottom:var(--border)}
.dialog-head h2 {margin:0;flex:1;font-size:17px;font-weight:575}
.dialog-head .icon-only {border-color:transparent;color:var(--subtle)}
#dialog-icon {display:grid;place-items:center;color:var(--subtle)}
#dialog-icon svg {width:18px;height:18px}
#fields {min-height:0;padding:17px var(--dialog-pad) 20px;overflow:auto;overscroll-behavior:contain}
#fields label {margin:0 0 13px}#fields label:last-child {margin-bottom:0}
#fields p {margin:0 0 12px;font-size:13px}#fields p:last-child {margin-bottom:0}
#fields.two-cols p,#fields.two-cols label:has(>[name=mode],>[name=sheet_id],>[name=stagger]) {grid-column:1/-1}
#fields.two-cols label {margin:0}
dialog .end {flex:none;margin:0;padding:12px var(--dialog-pad);border-top:var(--border);background:#fafbfb}
dialog.destructive #dialog-icon {color:var(--danger)}
dialog.destructive #confirm {background:var(--danger);border-color:var(--danger)}
#tool-tip {position:fixed;z-index:100;max-width:min(235px,90vw);pointer-events:none;border-radius:3px;padding:8px 10px;color:#fff;background:var(--rail);font-size:12px;line-height:1.45}
#tool-tip small {display:block;color:#b7c6c9;font-size:11px}
#tool-tip strong,#tool-tip span {display:block}#tool-tip strong {font-weight:600}#tool-tip span {color:#e1e6e7}

@media(max-height:680px) {
  #cadbar {gap:3px}.cadgroup+.cadgroup {padding-top:3px}.cadgroup button {height:29px}
}
@media(max-width:1100px) {
  :root {--project-cols:minmax(0,1fr) 70px 170px 32px}
  .doc {gap:5px;padding-inline:6px}#views {gap:0}#views button {padding-inline:7px}
  .editor-tools {gap:1px}.identity {max-width:23vw}#properties {width:258px}
  #xy {bottom:57px}
}
@media(max-width:850px) {
  #home {grid-template-columns:var(--compact-width) minmax(0,1fr)}
  #home:not(.nav-compact) .workshop-side {z-index:8;width:210px;box-shadow:4px 0 14px #182c321c}
  .library {padding:28px 20px}.homehead {margin-bottom:23px}
  .doc {flex-wrap:wrap;gap:4px;min-height:0;padding:4px 7px 0}
  .identity {flex:1;max-width:none}#views {order:3;width:100%;justify-content:center;gap:0}
  #views button {flex:1;min-height:35px;padding:4px 6px}#views button.active::after {left:3px;right:3px}
  #save-design {min-width:32px;padding:5px}#save-design .btn-label {display:none}
  .editor-tools .icon-only {--control:30px}.unit-control {margin-inline:2px}.unit-control select {padding:4px 5px}
  .builder {grid-template-columns:1fr}.builderpreview {position:static}
}
@media(max-width:700px) and (min-height:500px) {
  #workarea {display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}
  #cadbar {grid-column:1;grid-row:1;min-height:0}
  #workspace {grid-column:2;grid-row:1;min-height:0}
  #cadbar[hidden]+#workspace {grid-column:1/-1}
  #properties {grid-row:2;grid-column:1/-1;width:100%;max-width:100%;max-height:min(30dvh,270px);border-left:0;border-top:var(--border)}
  .section {padding:11px 15px}.section h3 {margin-bottom:6px}
  #viewtools {bottom:8px;left:8px}#xy {bottom:50px;right:6px}
}
@media(max-width:570px) {
  :root {--project-cols:minmax(0,1fr) 38px;--dialog-pad:17px}
  .library {padding:24px 15px}.homehead {gap:13px}.homehead h1 {font-size:28px}
  .homehead .tools {flex-wrap:wrap}.project-columns,.designcard {padding-inline:5px;gap:6px}
  .project-columns span:not(:first-child) {display:none}
  .design-open {grid-column:1;grid-template-columns:20px minmax(0,1fr);gap:3px 7px;padding-block:11px}
  .design-open>svg {grid-column:1;align-self:start;margin-top:2px}
  .design-open strong {grid-column:2;grid-row:1;padding-left:0}
  .design-meta {grid-row:2;grid-column:2;display:flex;align-items:center;flex-wrap:wrap;gap:1px 9px}
  .design-meta>small,.design-meta>time {font-size:11px}
  .card-trash {grid-column:2}
  .admin-tabs {gap:4px 12px}.admin-tabs button {font-size:12px}
  .master-row {gap:8px;padding-inline:4px;flex-wrap:wrap}
  .master-row small {max-width:55%;overflow-wrap:anywhere}
  .doc {gap:2px}.identity h1 {font-size:14px}
  #views button {font-size:12px;gap:4px}#views button svg {width:14px;height:14px}
  #rev {padding-left:4px;font-size:10px}.identity>small {font-size:10px}
  #cadbar {width:42px;padding-inline:2px}
  #viewtools .action-button {width:33px;padding:0}#viewtools .btn-label {display:none}
  #xy input {width:52px}#xy button .btn-label {display:none}
  footer {min-height:23px;padding:3px 7px;font-size:10px}#updated time {font-size:10px}
}
@media(max-width:360px) {
  #views button svg {display:none}
  #fields.two-cols {grid-template-columns:1fr}
}
@media(pointer:coarse) {
  .cadgroup button,.scope-switch button,#viewtools button {min-height:38px}
  .section>button,.section>.action-row>button {min-height:38px}
  .card-trash,.dialog-head .icon-only {--control:40px}
}

/* Inspector de medidas y especificaciones de impresión. */
.rect-fields.ratio-fields {grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);gap:8px;align-items:end}
.ratio-fields .ratio-lock {grid-column:auto;justify-self:stretch;width:28px;min-height:34px;padding:2px;border-color:transparent;color:var(--subtle)}
.ratio-fields .ratio-lock[aria-pressed=true] {color:var(--teal);background:var(--tint)}
.line-fields .apply-dimensions {grid-column:2}
.ink-field {min-width:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0 16px;padding:8px 0 0;border:0;border-top:var(--border)}
.ink-field legend {padding:0 8px 0 0;font-size:12px;font-weight:550}.ink-field legend i {display:inline-block;width:13px;height:13px;vertical-align:-2px;margin-right:6px;border:var(--border)}
#fields .ink-field label {margin:0}.paper-summary {font-variant-numeric:tabular-nums;color:var(--teal)}
#file-tools,#file-pages {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px}
#file-search {width:min(260px,100%);min-width:10rem}
#file-path:has(>strong:only-child){display:none}
.folder-path .drop-target {outline:2px solid var(--teal)}
.design-open .result-folder {color:var(--subtle);font-size:11px;overflow-wrap:anywhere;font-weight:400}
.folder-path {flex-wrap:wrap;gap:5px;color:var(--subtle);font-size:12px}.folder-path button {min-height:28px;padding:2px 4px;border:0;color:var(--teal)}
.folder-path strong {font-weight:550}.folder-path strong:only-child {display:none}
#file-tools .tools {margin-left:auto;gap:3px}#file-tools .tools>button:first-child {margin-right:6px}
#file-pages {justify-content:flex-end;margin:16px 0;color:var(--subtle);font-size:12px}
.project-columns,.designcard {--project-cols:minmax(0,1fr) 80px minmax(170px,22%) 76px}
.file-actions {display:flex;align-items:center;justify-content:flex-end;grid-column:4;grid-row:1;gap:2px}
.file-actions button {color:var(--subtle);background:transparent;border-color:transparent}
.folder-item {justify-content:flex-start;gap:10px;width:100%;padding:13px 14px;border:0;border-bottom:var(--border);border-radius:0}
.folder-item strong {font-weight:520}.folder-item svg {color:var(--teal)}
#projects.file-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(215px,100%),1fr));gap:12px}
.file-grid .folder-item {align-self:start;min-height:48px;border:var(--border);border-radius:var(--radius)}
.file-grid .designcard {display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;padding:0;border:var(--border);border-radius:var(--radius);overflow:hidden}
.file-grid .design-open {display:flex;flex-direction:column;align-items:stretch;gap:7px;padding:0 12px 5px;text-align:left}
.file-grid .design-open strong {padding:0;font-size:14px}
.file-grid .design-meta {display:flex;flex-wrap:wrap;gap:8px}
.file-preview {display:grid;place-items:center;height:112px;margin:0 -12px 5px;padding:12px;background:var(--soft);border-bottom:var(--border)}
.file-preview>svg {width:100%;height:100%;min-height:0}
.file-preview>svg[viewBox="0 0 24 24"]:not(:has(g)) {width:20px;height:20px;color:var(--subtle)}
.file-grid .file-actions {padding:0 9px 4px}
@media(max-width:650px){
 .project-columns,.designcard {--project-cols:minmax(0,1fr) 65px minmax(145px,22%) 64px}
 .file-actions button {--control:30px}
}
@media(max-width:570px){
 .project-columns,.designcard {--project-cols:minmax(0,1fr) 70px}
 .file-actions {grid-column:2}
 #projects.file-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .file-grid .design-open {padding-inline:8px}.file-preview {height:88px;margin-inline:-8px}
 .file-grid .design-meta {gap:2px}.file-grid .design-meta time {white-space:normal}
}
.grade-fields {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:10px 12px;margin:12px 0 16px}
#fields .grade-fields label {margin:0}
.grade-fields .paper-summary {grid-column:1/-1}

#file-workspace:has(#folder-tree:not([hidden])) {display:grid;grid-template-columns:minmax(165px,22%) minmax(0,1fr);gap:20px;align-items:start}
#folder-tree {border-right:var(--border);padding-right:10px;min-width:0;overflow:auto;max-height:65vh}
#folder-tree h2 {font-size:13px;margin:8px 0 12px}
.tree-line {display:flex;align-items:center;min-height:32px;border-radius:var(--radius)}
.tree-line:has([aria-current]) {background:#e7efef}
.tree-line.drop-target,.folder-item.drop-target {background:#dcefee;outline:2px solid var(--teal);outline-offset:-2px}
.tree-children {margin-left:10px;padding-left:4px;border-left:var(--border)}
.tree-line .tree-folder {border:0;min-width:0;flex:1;justify-content:flex-start;background:transparent;text-align:left;padding:5px 2px;gap:6px}
.tree-folder span {white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tree-spacer,.tree-line .tree-toggle {width:19px;min-width:19px}
.tree-line .tree-toggle {border:0;background:transparent;padding:0}
.tree-toggle[aria-expanded=true] svg {transform:rotate(90deg)}
.file-results {min-width:0}
.designcard.dragging {opacity:.55}
@media(max-width:750px){#file-workspace:has(#folder-tree:not([hidden])) {grid-template-columns:minmax(0,1fr);gap:10px}#folder-tree {max-height:24vh;border:0;border-bottom:var(--border);padding-bottom:6px}}

.grade-materials {margin:0;padding:0;border:0;display:flex;flex-wrap:wrap;gap:8px 18px}
.grade-materials legend {padding:0;margin-bottom:8px;font-weight:600}
#fields .grade-materials label {display:inline-flex;align-items:center;gap:6px;margin:0}
.grade-materials input {width:15px;height:15px;min-height:0;margin:0;accent-color:var(--teal)}

.align-key {display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:600}
.align-key button {margin:0}
.align-options {display:grid;grid-template-columns:repeat(3,minmax(32px,1fr));gap:4px;max-width:200px}
#inspect .align-options button {width:100%;margin:0}
.align-reference,.align-target,.snap-contact {fill:none;vector-effect:non-scaling-stroke;pointer-events:none}
.align-reference {stroke:#8c501d;stroke-width:3;stroke-dasharray:6 3}
.align-target {stroke:var(--teal);stroke-width:3}
.snap-contact {stroke:var(--teal);stroke-width:1.8;fill:#fff}

.double-region,.double-center {fill:none;pointer-events:none;vector-effect:non-scaling-stroke;stroke-linecap:round}
.double-region {stroke:#c56a11;stroke-width:7;stroke-opacity:.32}
.double-center {stroke:#8b450d;stroke-width:2;stroke-dasharray:5 3}
#inspect>.section:has(>.mount-metrics) {padding:9px 12px}
#inspect>.section:has(>.mount-metrics) h3 {margin-bottom:6px}
.mount-modes {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:var(--border);border-radius:var(--radius);overflow:hidden}
.mount-modes button {min-height:30px;font-size:11px;border:0;border-radius:0;padding:4px 2px}
.mount-modes {margin-bottom:6px}
.mount-modes button:focus-visible {outline-offset:-2px}
.mount-total {display:block;margin:12px 0 6px;font-size:14px}
.mount-metrics {--metric-value-height:16px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 6px}
.mount-metrics + .mount-metrics {margin-top:4px}
.mount-metrics [data-mount-field] {display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto var(--metric-value-height);align-content:center;gap:0;min-width:0;margin:0;padding:1px 5px;border:1px solid transparent;text-align:left}
.mount-metrics [data-mount-field="register_x"],.mount-metrics [data-mount-field="sheet_id"] {grid-column:1/-1}
.mount-metrics span {font-size:11px;line-height:14px;color:var(--subtle)}
.mount-metrics label[data-mount-field] {border:var(--border);border-radius:var(--radius);cursor:text}
@container (max-width:268px){
 #inspect>.section:has(>.mount-metrics) {padding-inline:8px}
 .mount-metrics [data-mount-field] {padding-inline:3px}
}
@container (max-width:252px){.mount-metrics {grid-template-columns:minmax(0,1fr)}}
.mount-metrics label:focus-within {outline:1px solid var(--teal);border-color:var(--teal)}
.mount-metrics label input,.mount-metrics label select {min-width:0;width:100%;height:var(--metric-value-height);line-height:var(--metric-value-height);min-height:0;border:0;outline:0;background:transparent;padding:0;font-family:inherit;font-size:12px;font-weight:600;color:inherit}
.mount-metrics [aria-invalid=true] {color:var(--danger)}
.mount-setup h3 > .icon-only {margin-inline-start:auto}
.box-suggestion circle {fill:var(--teal);stroke:white;stroke-width:.5}
.box-suggestion text {fill:white;font-weight:600}
.conflict-choices {display:flex;flex-wrap:wrap;gap:4px}
.mount-metrics [data-mount-field="boxes_per_sheet"] {border:var(--border);border-radius:var(--radius);background:var(--soft)}
.mount-metrics output {font-size:12px;line-height:var(--metric-value-height);font-weight:600;font-variant-numeric:tabular-nums}
@media(pointer:coarse){
 .mount-metrics {--metric-value-height:26px}
}
dialog:has(.mount-inputs) {width:min(820px,96vw)}
#fields:has(.mount-inputs) {display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:16px;align-items:start}
.mount-inputs fieldset {min-width:0;border:0;border-bottom:var(--border);padding:0 0 8px;margin:0 0 8px;display:grid;grid-template-columns:1fr 1fr;gap:5px 10px}
.mount-source-count {grid-column:1/-1}
.mount-source-count[open] summary {margin-bottom:6px}
.mount-inputs legend {font-size:13px;font-weight:650;margin-bottom:6px;padding:0}
#fields .mount-inputs label {min-width:0;margin:0}
.mount-inputs :disabled {opacity:.82;background:var(--soft)}
.mount-proof {position:sticky;top:0;display:grid;gap:8px;border:var(--border);border-radius:var(--radius);padding:12px}
.mount-proof svg {width:100%;height:160px;background:var(--soft)}
.mount-result {font-variant-numeric:tabular-nums}
@media(max-width:620px){#fields:has(.mount-inputs){grid-template-columns:1fr}.mount-proof{position:static;grid-row:1}.mount-proof svg{height:80px}}

.print-guide {fill:none;stroke-width:.14;stroke-linejoin:round}


.guide-settings {max-width:34rem;margin:0;border-block-start:var(--border)}
.guide-settings>div {display:flex;align-items:center;justify-content:space-between;border-block-end:var(--border);padding:.7rem .2rem}
.guide-settings dt {display:flex;align-items:center;gap:.65rem}
.guide-settings dd {margin:0;font-variant-numeric:tabular-nums}
.guide-swatch {display:inline-flex;width:1.5rem;flex:none;align-items:center}.guide-swatch svg {width:100%;height:.7rem}

#fields .guide-field-title {font-size:.85rem;margin:0 0 .8rem}
#fields label+.guide-field-title {border-top:var(--border);padding-top:1rem}
#model canvas,.previewcanvas canvas {cursor:grab;touch-action:none}
#model canvas.orbiting,.previewcanvas canvas.orbiting {cursor:grabbing}
.camera-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
.camera-grid button:nth-child(3n) {border-inline-end:0}
.camera-grid button:nth-child(-n+3) {border-bottom:var(--border)}

.rule-pattern-title {margin:1.8rem 0 .75rem}

.stock-faces {display:flex;gap:.8rem;align-items:center;flex-wrap:wrap;margin:.4rem 0 .6rem}
.stock-faces span {display:inline-flex;align-items:center;gap:.25rem;font-size:.75rem}
.stock-faces i {width:.8rem;height:.8rem;border:var(--border);border-radius:2px}
body.ct-portal {display:block;height:auto;min-height:100vh;overflow:auto;background:var(--canvas);color:var(--ink)}
.ct-portal header {height:64px;display:flex;justify-content:space-between;align-items:center;padding:0 6vw;border-bottom:var(--border);background:white}
.ct-portal header img {width:132px}.ct-portal main:not(.library) {max-width:1050px;margin:3rem auto;padding:0 1.5rem 4rem}
.ct-portal h1 {margin:0 0 1rem}.ct-portal h2 {margin:2rem 0 .9rem}.ct-portal h3 {margin:.25rem 0}
.ct-portal article,.ct-portal details {display:block;background:white;border:var(--border);border-radius:6px;padding:1rem;margin:0}
.ct-portal .inline-check input {display:inline;width:auto;min-height:0;margin:0 .35rem 0 0}
.ct-portal .portal-fields {display:flex;flex-wrap:wrap;gap:1rem}.ct-portal .portal-fields label {flex:1 1 190px}
.ct-portal form button,.ct-portal article form,.ct-portal details form {margin-top:.7rem}.ct-portal article,.ct-portal details {margin-bottom:.65rem}.ct-portal summary {cursor:pointer;font-weight:600}
.ct-portal details form {max-width:380px}.ct-portal .inline-check {display:block;margin:.4rem 0}
.ct-portal main a {color:var(--teal);font-weight:550}
body.account-page {background:var(--paper)}
.account-page main>.homehead h1 {margin:0}
.adjustment-help {color:var(--subtle);margin-bottom:12px;max-width:64ch}

.window-guides {border:0;padding:0;margin:1rem 0 0}
.window-guides legend {font-weight:600;color:var(--ink);padding:0}
.window-guides label {margin:.45rem 0}

#guide-picker {position:relative}
#guide-picker #guides::after {content:"";width:5px;height:5px;border:solid currentColor;border-width:0 1px 1px 0;transform:rotate(45deg);margin:0 1px 3px 0}
#viewtools #guides.active {background:var(--tint);color:var(--teal)}
#guide-menu {position:absolute;right:0;bottom:calc(100% + 7px);z-index:5;min-width:max-content;padding:4px;background:var(--paper);border:var(--border);border-radius:var(--radius);box-shadow:0 3px 14px #17283120}
#guide-menu label {display:flex;align-items:center;gap:8px;margin:0;padding:7px 9px;cursor:pointer;color:var(--ink);font-size:12px}
#guide-menu label:hover,#guide-menu label:focus-within {background:var(--soft)}
.window-guides small {display:block;line-height:1.45;margin-top:5px}

.active-mount {display:block;overflow-wrap:anywhere}
.mount-choices {position:relative;display:flex;flex-wrap:wrap;align-content:flex-start;gap:5px;max-height:9rem;overflow-y:auto;padding:2px}
.mount-choices:empty {display:none}
.mount-choice {display:flex;align-items:stretch;max-width:100%}
.mount-choice button:first-child {min-width:0;border-radius:var(--radius) 0 0 var(--radius)}
.mount-choice button.icon-only {flex:none;width:28px;min-height:28px;justify-content:center;padding:0;border-left:0;border-radius:0}
.mount-choice button.icon-only:last-child {border-radius:0 var(--radius) var(--radius) 0}
.mount-choice button.icon-only:last-child:hover {color:var(--danger);background:var(--danger-bg)}
.mount-choices[aria-busy=true] {opacity:.65}
.active-mount+.mount-choices:not(:empty) {margin-top:6px}
.mount-choices button {justify-content:flex-start;max-width:100%;min-height:28px;padding:4px 9px;gap:5px;font-size:12px;color:var(--subtle);border-color:var(--line);text-align:left}
.mount-choices button span {min-width:0;overflow-wrap:anywhere}
.mount-choices button svg {width:13px;height:13px}
.mount-choices button[aria-pressed=true] {background:var(--tint);color:var(--teal);border-color:var(--teal);font-weight:600}
.board-size,.profile-machine {display:flex;align-items:center;justify-content:space-between;gap:.75rem}
.board-size {font-size:.82rem}
#save-design:disabled {background:var(--soft);color:var(--subtle);border-color:var(--line);cursor:default}

.bridge-tools {display:grid;grid-template-columns:1fr 1fr;gap:.35rem}
.bridge-tools button {justify-content:center;font-size:.8rem;padding:.45rem .3rem}
.bridge-tools button[aria-pressed=true] {background:var(--tint);color:var(--teal);border-color:var(--teal)}
.bridge-hit,.bridge-indicator {fill:none;stroke:transparent;stroke-width:14;stroke-linecap:round;vector-effect:non-scaling-stroke;pointer-events:none}
#cad[data-bridge-mode=remove],#cad[data-bridge-mode=add] {--bridge-marker:#ac671e;cursor:crosshair}
.bridge-indicator {stroke:var(--bridge-marker,transparent);stroke-width:4}

.record-scroll {width:100%;min-width:0;overflow-x:auto}
.record-list {width:100%;border-collapse:collapse;font-size:13px}
.record-list th,.record-list td {text-align:left;padding:8px 12px;border-bottom:var(--border);vertical-align:middle}
.record-list thead {background:var(--soft);border-top:var(--border)}
.record-list th {padding-block:0;color:var(--subtle);white-space:nowrap}
.record-list .column-sort {min-height:34px;padding:3px 0;gap:5px;border:0;background:transparent;font-size:12px;font-weight:550;color:inherit;justify-content:flex-start}
.column-sort svg {width:13px;height:13px;stroke-width:2;opacity:.65}
.column-sort:is(:hover,:focus-visible) svg {opacity:1}
th[aria-sort]>.column-sort svg {color:var(--teal);opacity:1}
th[aria-sort=ascending]>.column-sort svg {transform:rotate(-90deg)}
th[aria-sort=descending]>.column-sort svg {transform:rotate(90deg)}
.record-list tr:focus-within,.record-list tbody tr:hover {background:var(--soft)}
.record-name,.bridge-defaults {display:flex;align-items:center;gap:10px}
.record-list td:last-child:has(button.icon-only) {text-align:right;width:1%}
.record-list .designcard {display:table-row}
.record-list .design-open {display:inline-flex;width:100%;min-width:9rem;align-items:center;justify-content:flex-start;gap:8px}
.record-list .design-open strong {padding:0}
.record-list .file-actions {white-space:nowrap}
.record-list time {white-space:nowrap}
.bridge-defaults {gap:clamp(16px,5vw,80px);flex-wrap:wrap;margin:4px 0}
.bridge-defaults dt {font-size:12px;color:var(--subtle)}
.bridge-defaults dd {margin:3px 0;font-weight:550}
.board-profile {margin-inline-start:auto;display:inline-flex;color:var(--subtle);align-items:center;justify-content:center;min-width:28px;min-height:26px}
.board-count {color:var(--subtle);margin-inline-start:auto}
.board-setting #manual-grip {width:54%;min-width:0}
.editable-record {cursor:pointer}
.account-page .record-list details {margin:0;padding:0;border:0}
.account-page .record-list details[open] {min-width:13rem}
@media(max-width:650px){.record-list th,.record-list td{padding-inline:7px}}

.line-properties {margin-top:7px;border-top:var(--border);padding-top:7px}
.line-properties summary {cursor:pointer;font-size:12px;color:var(--subtle)}
.precision-actions,.reviewnav {border:var(--border);border-radius:var(--radius);background:var(--soft);padding:2px}
.precision-actions {display:grid;grid-template-columns:repeat(var(--tool-count),minmax(0,1fr));max-width:calc(var(--tool-count)*38px + 6px);margin-block:7px}
.precision-actions .precision-icon,.reviewnav .inspector-action {position:relative;justify-content:center;min-width:0;width:100%;height:32px;min-height:0;padding:0;border:0;border-radius:3px;background:transparent;color:var(--ink)}
.precision-actions .group-start::before {content:"";position:absolute;left:0;top:24%;bottom:24%;border-left:var(--border)}
.precision-actions button:focus-visible,.reviewnav button:focus-visible {outline-offset:-2px}
.reviewnav {display:flex;align-items:center;width:max-content;max-width:100%;margin-block:6px}
.reviewnav .inspector-action {width:32px}
.reviewnav .inspector-action:hover:not(:disabled),.precision-actions .precision-icon:hover:not(:disabled) {background:var(--paper);color:var(--teal)}
.issue-count {font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;text-align:center;min-width:45px;padding-inline:2px}
.issue-actions {display:flex;align-items:center;border-inline-start:var(--border);margin-inline-start:3px;padding-inline-start:3px}
.section h3>.inspector-action {--control:28px;min-height:var(--control);border:0;background:transparent;color:var(--subtle)}
.section h3>.inspector-action:first-child {margin-inline-start:-4px}
.section h3>.inspector-action:last-child:not(:first-child) {margin-inline-start:auto}
.section h3>.inspector-action:hover:not(:disabled) {background:var(--tint);color:var(--teal)}
.material-section h3:only-child {margin-bottom:0}
#inspect {container-type:inline-size}
@container (max-width:266px){.precision-actions {grid-template-columns:repeat(var(--compact-count),minmax(0,1fr));max-width:calc(var(--compact-count)*42px + 6px)}.precision-actions .group-start::before {display:none}}

.precision-icon {height:32px;min-height:0;min-width:32px;padding:5px;border:0;background:transparent;line-height:1}
.precision-icon svg,#precision-picker summary svg {width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.precision-actions .precision-icon:hover,.precision-menu-group button:hover {background:var(--tint);color:var(--teal)}
.section h3>.precision-icon {margin-left:auto;height:24px;min-width:24px;color:var(--subtle)}
.precision-value-form {display:flex;gap:6px;align-items:flex-end;margin:8px 0}
.precision-value-form label {flex:1;margin:0;min-width:0}
.precision-value-form input {width:100%}
.precision-value-form .precision-icon {height:34px;color:white;background:var(--teal)}
#precision-picker {position:absolute;z-index:4;right:10px;top:10px}
#precision-picker summary {display:flex;align-items:center;gap:6px;padding:6px 8px;border:var(--border);border-radius:var(--radius);background:var(--paper);cursor:pointer;font-size:12px;font-weight:550;list-style:none}
#precision-picker summary::-webkit-details-marker {display:none}
#precision-picker summary:after {content:"";width:5px;height:5px;border:solid var(--subtle);border-width:0 1px 1px 0;transform:rotate(45deg);margin:-3px 1px 0 2px}
#precision-picker[open] summary {color:var(--teal)}
#precision-list {position:absolute;inset:calc(100% + 5px) 0 auto auto;width:248px;max-width:calc(100vw - 58px);max-height:min(65dvh,390px);overflow:auto;border:var(--border);border-radius:var(--radius);box-shadow:0 3px 14px #17283120;background:var(--paper)}
.precision-menu-group {display:grid;grid-template-columns:1fr 1fr;gap:1px;padding:6px}
.precision-menu-group+.precision-menu-group {border-top:var(--border)}
.precision-menu-group small {grid-column:1/-1;padding:0 5px;font-size:11px}
.precision-menu-group .precision-icon {justify-content:flex-start;font-size:12px;text-align:left;height:auto;min-height:30px;line-height:1.2}
#precision-picker:not([hidden])~#selection-size {max-width:calc(100% - 135px)}
@media(pointer:coarse){
 .precision-actions {grid-template-columns:repeat(var(--compact-count),minmax(0,1fr));max-width:calc(var(--compact-count)*46px + 6px)}
 .precision-actions .precision-icon,.reviewnav .inspector-action,.section h3>.inspector-action {height:42px}
 .precision-actions .group-start::before {display:none}
 .reviewnav .inspector-action,.section h3>.inspector-action {width:42px}
}
.precision-ghost,.precision-result,.corner-retire {fill:none;vector-effect:non-scaling-stroke;pointer-events:none}
.precision-ghost {stroke:var(--teal);stroke-width:2;stroke-dasharray:5 2}
.precision-result {stroke-width:3}
.corner-retire {stroke:var(--paper);stroke-width:4;stroke-dasharray:2 2}
.corner-handle {cursor:grab;touch-action:none}
.corner-handle path {fill:white;stroke:var(--teal);stroke-width:1.6}
.corner-handle:active {cursor:grabbing}
.precision-choice,.precision-trim,.precision-selected {fill:none;vector-effect:non-scaling-stroke;stroke-linecap:round}
.precision-selected {stroke:var(--selection-color,#007b98);stroke-width:calc(var(--stroke-width,1.4px) + var(--selection-extra,1.6px))}
.precision-choice {stroke:#a36716;stroke-width:3;stroke-dasharray:5 3}
.precision-trim {stroke:#bf3345;stroke-width:5}

.direct-fields {display:grid;grid-template-columns:1fr 1fr;gap:6px}
.direct-fields label {min-width:0}.direct-fields input,.direct-fields select {width:100%}
.direct-fields button {grid-column:2}
.junction-point,.stretch-node {fill:var(--paper);stroke:var(--teal);stroke-width:1.5;vector-effect:non-scaling-stroke}
.junction-point {stroke:#ad6217}
#cad text.editable-dimension {pointer-events:visiblePainted;cursor:pointer}

.revision-link {border:0;color:var(--subtle);font-size:11px;min-height:24px;padding:0 4px}
.version-controls,.version-form {display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.version-controls label {margin:0;gap:6px}
.version-actions {display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.version-actions button {padding-inline:8px}
.version-form {padding-top:12px;border-top:var(--border)}
.version-buttons {display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.version-result {display:grid;gap:4px;font-size:12px;color:var(--subtle)}
.version-result:empty,.version-form .error:empty {display:none}
.version-form .error {font-size:12px}
.version-result button {justify-self:start}
.version-result .diff-key {display:flex;align-items:center;gap:7px}
.version-result .diff-key::before {content:"";width:14px;border-top:1px solid}
.version-result .diff-key.old::before {border-top-style:dashed}
.workflow-details {margin:6px 0}.workflow-details form {margin-top:8px}
.diff-stroke,.diff-mark,.repeat-group path,.fold-hinge {fill:none;vector-effect:non-scaling-stroke}
.diff-stroke {pointer-events:none;stroke-width:var(--comparison-width,.85px)}
.diff-stroke.old {stroke:var(--previous-color,#ba5042);stroke-dasharray:3 2}.diff-stroke.new {stroke:var(--current-color,#167b67)}
.diff-mark {r:var(--diff-mark-radius)}
.diff-mark.old {stroke:var(--previous-color,#ba5042);stroke-width:min(.75px,var(--comparison-width,.85px))}.diff-mark.new {fill:var(--current-color,#167b67)}
.diff-key.old::before {border-color:var(--previous-color,#ba5042)}.diff-key.new::before {border-color:var(--current-color,#167b67)}
.repeat-group path {stroke:#adb8b9;stroke-width:4;cursor:pointer}.repeat-group.included path {stroke:#137f78}
.fold-face {fill:#88aeb1;fill-opacity:.16;cursor:pointer}.fold-face:hover,.fold-face.base {fill:#357e89;fill-opacity:.35}
.fold-hinge {stroke:#63828a;stroke-width:6;stroke-opacity:.5;cursor:pointer}.fold-hinge.active {stroke:#007a72;stroke-opacity:.85}

.move-guides{fill:none;stroke:var(--teal);stroke-width:.75;stroke-dasharray:3 4;vector-effect:non-scaling-stroke;opacity:.7}

dialog:has(.machine-spec) {width:min(680px,calc(100% - 28px))}
.machine-spec {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px;margin-bottom:12px}
.machine-spec fieldset {min-width:0;margin:0;border:0;border-top:var(--border);padding:7px 0 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:end}
.machine-spec legend {font-weight:600;padding-right:8px}
#fields .machine-spec label {min-width:0;margin:0}
.machine-spec label:has([name=wood_grip]) {grid-column:1/-1}
@media(max-width:600px){.machine-spec {grid-template-columns:minmax(0,1fr)}}

.mount-default-values {display:grid;grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));gap:12px;margin:12px 0 24px}
.mount-default-values dt {color:var(--subtle);font-size:12px}
.mount-default-values dd {margin:4px 0 0;font-weight:600}
.sheet-format-title:not(:empty) {display:block;margin:0 0 16px;font-weight:600}
.sheet-materials {border:var(--border);padding:8px 12px;margin:0 0 12px}
#fields .sheet-materials label {display:flex;align-items:center;gap:8px;margin:.35rem 0}
#fields .sheet-materials input {width:auto;min-height:0}
.profile-settings {margin:24px 0;max-width:58rem}
.profile-settings h2 {margin:0}
.profile-settings .master-head {flex-wrap:wrap}
.profile-settings .tools {flex-wrap:wrap}
.profile-stock-list {width:100%;margin:12px 0;border-collapse:collapse;font-size:13px}
.profile-stock-list th,.profile-stock-list td {padding:.55rem;text-align:left;border-bottom:var(--border)}
.ct-portal .dialog-head h2 {margin:0}
.ct-portal #dialog button {margin-top:0}

#workspace {--ruler-size:24px}
#workspace.with-rulers :is(#cad,#work-guide-overlay) {inset:var(--ruler-size) 0 0 var(--ruler-size);width:calc(100% - var(--ruler-size));height:calc(100% - var(--ruler-size))}
#workspace.with-rulers #precision-picker {top:calc(var(--ruler-size) + 8px)}
#workspace.with-rulers #selection-size {top:calc(var(--ruler-size) + 8px);left:calc(var(--ruler-size) + 8px)}
#workspace.with-rulers #viewtools {left:calc(var(--ruler-size) + 8px);max-width:calc(100% - var(--ruler-size) - 16px)}
#work-guide-overlay {position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:hidden}
#work-guide-overlay line {stroke:var(--work-guide,#808080);stroke-width:var(--guide-width,.5px);vector-effect:non-scaling-stroke}
#work-guide-overlay line:focus {outline:none}
#work-guide-overlay line:focus-visible {stroke-width:calc(var(--guide-width,.5px) + .25px)}
#work-guide-overlay .return-guide {stroke-dasharray:4 4}
#ruler-frame {position:absolute;inset:0;pointer-events:none}
#ruler-frame svg,#ruler-unit {position:absolute;background:var(--paper);touch-action:none;user-select:none;pointer-events:auto}
#ruler-top {top:0;left:var(--ruler-size);width:calc(100% - var(--ruler-size));height:var(--ruler-size);cursor:ns-resize;box-shadow:inset 0 -1px var(--line-strong)}
#ruler-left {left:0;top:var(--ruler-size);height:calc(100% - var(--ruler-size));width:var(--ruler-size);cursor:ew-resize;box-shadow:inset -1px 0 var(--line-strong)}
#ruler-unit {min-height:0;min-width:0;padding:0;border:0;border-radius:0;cursor:crosshair;inset:0 auto auto 0;width:var(--ruler-size);height:var(--ruler-size);display:grid;place-items:center;font-size:10px;color:var(--subtle);border-right:var(--border);border-bottom:var(--border)}
#ruler-frame path {stroke:var(--line-strong);fill:none;shape-rendering:crispEdges}
#ruler-frame text {font:10px system-ui,sans-serif;fill:var(--subtle);font-variant-numeric:tabular-nums}
#ruler-frame :is(button,svg):focus-visible {outline:2px solid var(--teal);outline-offset:-2px}
#workspace[data-guide-drag=y],#cad.guide-y,#cad.guide-y .hit {cursor:ns-resize}
#workspace[data-guide-drag=x],#cad.guide-x,#cad.guide-x .hit {cursor:ew-resize}

#workspace[data-guide-drag=origin] {cursor:crosshair}

.appearance-form {max-width:620px;display:grid;gap:18px}
.appearance-form fieldset {margin:0;padding:10px 0 0;min-width:0;border:0;border-top:var(--border)}
.appearance-form legend {padding:0 8px 0 0;font-weight:600}
.appearance-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}
.appearance-fields label {display:grid;align-content:end;gap:4px;color:var(--subtle)}
.appearance-fields :is(input,select) {width:100%;min-width:0;height:34px}
.appearance-fields input[type=color] {padding:3px 5px;cursor:pointer}
.appearance-sample {display:block;max-width:320px;margin-top:12px;background:var(--soft);--diff-mark-radius:calc(var(--bridge-diameter) / 2)}
.appearance-guide {fill:none;stroke:var(--work-guide);stroke-width:var(--guide-width)}
.appearance-markers {border-collapse:collapse;width:100%}
.appearance-markers :is(th,td) {text-align:left;border-bottom:var(--border);padding:5px 3px}
.appearance-markers thead {font-size:12px;color:var(--subtle)}
.appearance-markers tbody th {font-weight:500}
.appearance-markers input {min-width:0;width:100%;max-width:80px}
.appearance-markers input[type=color] {width:38px;height:30px;padding:2px;cursor:pointer}
.marker-sample {display:block;background:var(--canvas-color);border-radius:2px}
.appearance-markers + small {display:block;margin-top:6px;color:var(--subtle)}
.appearance-status {margin:0;color:var(--subtle)}
.appearance-status:empty {display:none}
.appearance-sample.canvas-sample {background-color:var(--canvas-color);background-image:radial-gradient(var(--grid-color) .6px,transparent .8px);background-size:20px 20px}
.appearance-sample {background-color:var(--canvas-color,var(--soft))}
.type-appearance p {margin:0 0 8px}
.type-appearance-row {display:grid;grid-template-columns:minmax(6em,1fr) 52px 38px minmax(3em,5em) auto;gap:8px;align-items:center;padding:5px 0;border-bottom:var(--border)}
.type-appearance-row input {min-width:0;width:100%}
.type-appearance-row input[type=color] {height:30px;padding:2px;cursor:pointer}
.type-appearance-row .stroke-sample,.stroke-picker .stroke-sample {display:block;flex:none;background:var(--canvas-color,#fafbfb);border-radius:2px}
.stroke-picker {margin-bottom:10px}
.stroke-picker label {margin:0 0 4px}
#stroke-type,.stroke-options [role=option] {display:flex;width:100%;align-items:center;gap:9px;min-height:30px;padding:4px 8px;text-align:left}
#stroke-type::after {content:"";width:6px;height:6px;margin:-3px 3px 0 auto;border:solid currentColor;border-width:0 1px 1px 0;transform:rotate(45deg)}
.stroke-options {margin:3px 0 0;border:var(--border);border-radius:var(--radius);background:var(--paper);max-height:260px;overflow:auto}
.stroke-options [role=option] {cursor:pointer}
.stroke-options [aria-selected=true] {font-weight:600}
.stroke-options .highlight,.stroke-options [role=option]:hover {background:var(--tint)}
.type-appearance-head {font-size:12px;color:var(--subtle)}

[data-board-outline] {fill:var(--wood-color,#f5ecdf);stroke:var(--board-border-color,#000);stroke-width:var(--board-border-width,.7px);vector-effect:non-scaling-stroke}
[data-board-border-pattern=dashed] [data-board-outline] {stroke-dasharray:6 4}
[data-board-border-pattern=dotted] [data-board-outline] {stroke-dasharray:1 3;stroke-linecap:round}
.board-card-hit {fill:transparent;stroke:none;cursor:pointer}
[data-board-card][aria-pressed=true] .board-card-hit {stroke:var(--selection-color,#007b98);stroke-width:1px;stroke-dasharray:4 3;vector-effect:non-scaling-stroke}
.card-grip {fill:white;stroke:var(--selection-color,#007b98);stroke-width:1.5px;vector-effect:non-scaling-stroke}
[data-card-corner=nw],[data-card-corner=se] {cursor:nwse-resize}
[data-card-corner=ne],[data-card-corner=sw] {cursor:nesw-resize}
[data-card-turn] {cursor:pointer;color:var(--selection-color,#007b98)}

[data-mount-frame] {fill:none;vector-effect:non-scaling-stroke}
[data-mount-frame=sheet] {
  stroke:var(--sheet-border-color,#0099ff);stroke-width:var(--sheet-border-width,.6px);
  stroke-dasharray:var(--sheet-border-dash,none);stroke-linecap:var(--sheet-border-cap,butt);
}
[data-mount-frame=area] {
  stroke:var(--area-border-color,#677e87);stroke-width:var(--area-border-width,.4px);
  stroke-dasharray:var(--area-border-dash,6 4);stroke-linecap:var(--area-border-cap,butt);
}
[data-mount-frame=grip] {
  stroke:var(--grip-border-color,#ff7300);stroke-width:var(--grip-border-width,.6px);
  stroke-dasharray:var(--grip-border-dash,none);stroke-linecap:var(--grip-border-cap,butt);
  fill:var(--grip-fill-color,#ff7300);fill-opacity:var(--grip-fill-opacity,.5);
}

[data-board-layer=despunte] {stroke:var(--despunte-color,#ff4000);stroke-width:var(--despunte-width,.55px);vector-effect:non-scaling-stroke}
[data-despunte-pattern=dashed] [data-board-layer=despunte] {stroke-dasharray:6 4}
[data-despunte-pattern=dotted] [data-board-layer=despunte] {stroke-dasharray:1 3;stroke-linecap:round}

dialog:has(.assembly-inputs){width:min(1000px,96vw)}
#fields:has(.assembly-inputs){grid-template-columns:minmax(265px,.8fr) minmax(0,1.25fr)}
.assembly-preview{position:sticky;top:0;display:grid;gap:8px;min-width:0}
.assembly-preview .previewcanvas{height:clamp(220px,42vh,430px);border:var(--border);border-radius:var(--radius)}
.assembly-preview [aria-pressed=true]{background:var(--soft);border-color:var(--teal)}
.assembly-preview .error:empty{display:none}
.assembly-inputs label:has([name=title]),.assembly-inputs label:has([name=stock]){grid-column:1/-1}
@media(max-width:670px){#fields:has(.assembly-inputs){grid-template-columns:1fr}.assembly-preview{position:static}.assembly-preview .previewcanvas{height:230px}}

.parts-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;margin-bottom:6px}
.parts-tabs button{font-size:11px;padding:4px 2px}
.parts-tabs button[aria-pressed=true]{border-color:var(--teal);background:var(--soft);color:var(--teal)}
.parts-fields{display:grid;gap:6px}.parts-fields:empty,.piece-library .error:empty,.parts-list:empty{display:none}
.parts-fields label{display:grid;gap:2px;font-size:11px;min-width:0}.parts-fields input,.parts-fields select{width:100%;min-width:0}
.part-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.parts-list{border-top:var(--border);margin-top:8px;padding-top:4px}
.instance-row{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:12px}
.instance-row button{font-size:11px;padding:2px 6px}

#drawing.placing-part,svg.placing-part,svg.placing-part *{cursor:crosshair}

#composition-palette {
    position:absolute;z-index:4;top:32px;left:32px;width:344px;
    max-width:calc(100% - 42px);max-height:calc(100% - var(--palette-top,32px) - 48px);
    display:flex;flex-direction:column;color:var(--ink);background:var(--paper);
    border:1px solid var(--line-strong);border-radius:7px;box-shadow:0 4px 16px #17232a26;
}
.palette-head {display:flex;align-items:center;justify-content:space-between;min-height:36px;padding:2px 4px 2px 0}
.palette-head h2 {flex:1;min-width:0;margin:0;font-size:13px}
#composition-handle,#composition-toggle {border:0;background:transparent;min-height:30px}
#composition-handle {justify-content:flex-start;width:100%;padding:2px 9px;cursor:grab;touch-action:none;user-select:none;font-weight:650}
#composition-handle:active {cursor:grabbing}
#composition-toggle {width:30px;flex:none;padding:5px;background:var(--soft);color:var(--ink)}
#composition-toggle:hover {background:var(--tint);color:var(--teal)}
#composition-toggle[aria-expanded=true] svg {transform:rotate(90deg)}
.palette-head svg {width:15px;height:15px}
#composition-content {display:flex;flex-direction:column;min-height:0;border-top:var(--border);overflow:hidden}
.composition-modes,.part-commit,.parts-footer {flex:none}
.composition-modes {display:flex;border-bottom:var(--border);padding:0 10px;gap:14px}
.composition-modes button {min-height:36px;padding:4px 3px;background:transparent;border:0;border-bottom:2px solid transparent;border-radius:0;color:var(--subtle)}
.composition-modes button[aria-pressed=true] {background:var(--paper);border-bottom-color:var(--teal);color:var(--teal);font-weight:650}
.composition-scroll {min-height:0;overflow:auto;scrollbar-width:thin;overscroll-behavior:contain;padding:10px}
#composition-content .parts-tabs {margin:0 0 10px;padding:3px;grid-template-columns:repeat(3,minmax(0,1fr));background:var(--soft);border-radius:5px}
.parts-tabs button {min-height:26px;border:0;background:transparent}
.parts-tabs button[aria-pressed=true] {background:var(--paper);box-shadow:0 1px 3px #17232a26}
.parts-fields {gap:8px}
#composition-content label {margin:0}
#composition-content input,#composition-content select {min-height:29px;padding:3px 6px}
.part-heading {display:grid;grid-template-columns:1fr auto;align-items:center;gap:3px}
.part-heading h3 {grid-column:1/-1;margin:0;font-size:16px;font-weight:650;line-height:1.3}
.part-kind {color:var(--subtle);font-size:11px}
.part-location,.part-geometry {display:grid;gap:5px}
.part-location {border-bottom:var(--border);padding-bottom:8px}
.part-location:has(.part-location-head) {container-type:inline-size;gap:9px;border-top:var(--border);padding-block:10px 12px}
.part-location-head {display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap}
.part-location-head h4,.part-geometry h4 {margin:0;font-size:12px}
.part-insertion-options {display:grid;grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr);gap:9px}
@container (max-width:284px){.part-insertion-options{grid-template-columns:minmax(0,1fr)}}
.part-pair {align-items:start;column-gap:9px;row-gap:5px}
.part-pair label {align-content:start}
.part-field-cell {min-width:0}
.part-param {display:grid;grid-template-columns:minmax(0,1fr) 24px;align-items:center;gap:2px;min-width:0}
.part-param>label,.part-param.part-bound::after {grid-column:1/-1}
.part-param-reset {width:24px;min-height:28px;padding:3px;background:transparent;border:0;color:var(--subtle)}
.part-param-reset svg {width:14px;height:14px}
.part-bevel .part-param {max-width:180px}
.part-bound input {background:var(--soft);color:var(--subtle);border-color:var(--line)}
.part-bound::after {content:"Vinculado al borde";font-size:10px;font-weight:400}
#composition-content .part-fit {display:flex;align-items:center;gap:5px}
#composition-content .part-fit input {min-height:0;width:auto}
.part-parameters,.part-calculation {border-top:var(--border);padding-top:5px}
.part-parameters summary,.part-calculation summary {padding:3px 0;font-size:12px;font-weight:600}
.part-parameters[open]>.part-pair {padding:3px 0}
.part-bevel {margin-top:2px}
.part-bevel summary {font-size:11px;font-weight:450;color:var(--subtle)}
.part-bevel label {max-width:150px}
.part-formula {display:grid;gap:2px;padding:5px 0;border-bottom:var(--border);font-size:11px}
.part-formula small,.part-host-size {color:var(--subtle);font-size:11px}
.part-parameters input::placeholder {color:var(--subtle);opacity:1}
.parts-list {border:0;padding:0;margin:0}
#composition-content .instance-row {position:relative;display:grid;grid-template-columns:minmax(0,1fr) 27px 27px;align-items:center;
    gap:2px;padding:4px 2px 4px calc(3px + var(--level,0)*13px);border:1px solid transparent;border-radius:4px}
#composition-content .instance-row.is-selected {background:var(--tint);border-color:#afcacc}
.instance-row.branch::before {content:"";position:absolute;left:calc(var(--level)*13px - 6px);top:0;height:50%;width:8px;border-left:var(--border);border-bottom:var(--border)}
.instance-icon {display:grid;place-items:center;width:23px;height:26px;flex:none;color:var(--teal)}
.instance-caption {display:grid;min-width:0;gap:1px}
.instance-caption strong {font-size:12px;font-weight:550}
.instance-caption small {font-size:11px;line-height:1.25}
.instance-actions {grid-column:1/-1;display:flex;justify-content:flex-end;gap:6px;padding:3px 0}
.instance-actions button {min-height:25px}
.instance-row .row-action {width:27px;height:28px;min-height:0;border:0;background:transparent;padding:5px;color:var(--subtle)}
.row-more[aria-expanded=true] {background:var(--soft)}
.part-commit:not(:empty),.parts-footer:not(:empty) {display:flex;align-items:center;gap:7px;border-top:var(--border);padding:8px 10px;background:var(--paper)}
.part-commit button {flex:1;min-height:31px;font-size:12px;padding:5px}
.part-commit button.part-cancel {flex:none;border-color:transparent;color:var(--subtle)}
.parts-footer button {min-height:26px;border-color:transparent;padding:2px 4px;color:var(--teal);font-size:12px}
#composition-content>.error:not(:empty) {padding:5px 10px;font-size:12px}
@media(max-width:700px){#composition-palette{width:322px;max-width:calc(100% - 36px);max-height:calc(100% - var(--palette-top,32px) - 42px)}}
.component-groups {display:grid;gap:8px}
.component-groups h3,.component-name {margin:0 0 5px;font-size:12px;line-height:1.3}
.component-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.component-choice {display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:4px;min-width:0;padding:5px;text-align:left;font-size:11px;line-height:1.25}
.component-choice:hover,.component-choice:focus-visible {border-color:var(--teal);background:var(--tint)}
.component-thumb {display:grid;place-items:center;width:100%;height:46px;overflow:hidden;background:var(--soft);border-radius:3px}
.component-thumb svg {display:block;width:100%;height:100%}
.component-detail {height:80px}
.component-detail small {padding:6px;text-align:center}
#composition-content .component-back {justify-self:start;min-height:25px;padding:2px 4px;color:var(--teal);border:0}
.component-back svg {width:14px;height:14px}
#composition-content .instance-row .instance-name {flex:1;min-width:0;border:0;padding:2px 0;justify-content:flex-start;text-align:left;font-size:12px;background:transparent}
#composition-content .instance-name:hover {color:var(--teal)}
#cad [data-instance-hit] {cursor:pointer}
#cad.drafting [data-instance-hit] {cursor:crosshair}

.part-fold-limit{font-size:.77rem;line-height:1.35}
.part-fold-limit small{display:block;font-size:10px;color:var(--subtle)}
.part-fold-limit .part-use-max{margin-top:4px}
.parts-fields input[aria-invalid="true"]{border-color:#af432b}

.parts-fields .component-detail {height:clamp(154px,22vh,200px);background-color:var(--soft);border:var(--border);border-radius:5px}
.component-detail [data-preview-face] {cursor:pointer}
.component-detail [data-preview-face]:hover {fill:var(--teal);fill-opacity:.10}
.part-preview-tools {display:flex;gap:5px}
.part-preview-tools select {flex:1;min-width:0}
.part-param-finder {min-width:0}
.part-param-results {margin-top:4px;max-height:min(230px,32vh);overflow:auto;border:var(--border);border-radius:var(--radius);padding:3px}
.part-param-results button {display:grid;grid-template-columns:minmax(32px,max-content) 1fr;align-items:baseline;width:100%;gap:9px;padding:5px 8px;min-height:32px;text-align:left;border:0;background:transparent;font-size:12px}
.part-param-results button:hover,.part-param-results button:focus-visible {background:var(--tint)}
.part-param-results b {color:var(--teal);font-size:11px;overflow-wrap:anywhere}
.part-param-results small {display:block;font-size:10px;font-weight:400}
.part-param-results p {margin:4px 7px;font-size:12px;color:var(--subtle)}
#cad .dimension-label:hover,#cad .dimension-label:focus-visible {fill:var(--teal);text-decoration:underline}
.part-face-measures {min-width:0}
.part-face-measures summary {padding:6px 2px;color:var(--teal);font-size:12px;font-weight:600;cursor:pointer}
.part-measure-unit {display:none;float:right;font-size:11px;font-weight:500;color:var(--subtle)}
.part-face-measures[open] .part-measure-unit {display:inline}
.part-face-measures table {width:100%;border-collapse:collapse;font-size:12px}
.part-face-measures th,.part-face-measures td {padding:6px;text-align:right;line-height:1.35}
.part-face-measures thead th {background:var(--soft);color:var(--subtle);font-weight:550;font-size:11px}
.part-face-measures th:first-child {text-align:left}
.part-face-measures tbody th {padding:0}
.part-face-measures tbody tr {border-bottom:var(--border);cursor:pointer}
.part-face-measures tbody tr:last-child {border-bottom:0}
.part-face-measures tbody tr:hover,.part-face-measures tbody tr:focus-within {background:var(--tint)}
.part-face-measures .part-face-measure {display:block;width:100%;min-height:32px;padding:6px;text-align:left;background:transparent;border:0;color:var(--teal);font-size:12px}
.part-face-measures td {white-space:nowrap;font-variant-numeric:tabular-nums}
.component-detail.draft-invalid {background-color:#fbf3ee;border-color:#e4c8ba}
.component-detail.draft-invalid path[data-layer=cut] {stroke:var(--danger)}
.preview-status,.preview-error {color:var(--danger);font-size:11px}
.preview-status:empty,.preview-error:empty,.part-angle-status:empty {display:none}
.preview-status {margin-top:-6px}
.part-angle-status {margin:5px 0;padding:7px 9px;border-left:3px solid var(--danger);background:var(--danger-bg);font-size:11px;line-height:1.4}
.part-angle-status strong {font-size:12px}
.part-angle-status p {margin:2px 0}
.part-angle-fix {min-height:25px;padding:2px 6px;margin-top:3px;font-size:11px}

.part-angle-status.angle-valid {display:flex;justify-content:space-between;align-items:center;padding:4px 0;
    border:0;border-top:var(--border);background:transparent;color:var(--subtle)}
.part-angle-status.angle-valid b {color:var(--ink);font-variant-numeric:tabular-nums}


/* Directorios y formularios de administración */
.account-page main a.directory-link {
  display:inline-flex;align-items:center;justify-content:center;min-height:var(--control);
  padding:6px 14px;border:1px solid var(--line-strong);border-radius:var(--radius);
  text-decoration:none;font-size:13px
}
.account-page main a.directory-link:not(.primary-link) {color:var(--ink);background:var(--paper)}
.account-page main a.directory-link:not(.primary-link):hover {background:var(--soft)}
.directory-breadcrumb {margin-bottom:10px;font-size:12px}
.directory-breadcrumb a {text-decoration:none}
.directory-breadcrumb a:hover,.corrector-table a:hover {text-decoration:underline}
.directory-search,.directory-actions,.directory-pagination,.directory-pagination div {display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.directory-search {align-items:flex-end;margin:0 0 20px}
.directory-search label {margin:0}.directory-search label:first-child {flex:1 1 240px;max-width:380px}
.directory-search label:nth-child(2) {min-width:120px}
.directory-search a {align-self:flex-end;line-height:34px;font-size:13px}
.corrector-directory .directory-search button,.corrector-directory .directory-actions button {margin:0}
.corrector-table th {height:36px}.corrector-table td {height:45px}
.corrector-table td:last-child {text-align:right}.corrector-table a {text-decoration:none}
.directory-state {display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.directory-state::before {content:"";width:7px;height:7px;background:var(--line-strong);border-radius:50%}
.directory-state.on::before {background:var(--teal)}
.directory-pagination {justify-content:space-between;margin-top:14px;color:var(--subtle);font-size:13px}
.directory-empty {padding:20px 0;border-block:var(--border);color:var(--subtle)}
#directory-status:not(:empty) {margin:0 0 14px;color:var(--teal);font-size:13px}
.corrector-form {max-width:640px}
.corrector-form fieldset {min-width:0;margin:0 0 22px;border:var(--border);border-radius:6px;padding:12px 18px 16px}
.corrector-form legend {font-weight:600;padding-inline:5px}
.directory-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px}
.corrector-form [role=status]:not(:empty) {margin-top:14px}.directory-actions a {font-size:13px}
@media(max-width:650px){
  .directory-grid {grid-template-columns:minmax(0,1fr)}
  .directory-search label:first-child {max-width:none}
  .corrector-table th,.corrector-table td {padding-inline:7px}
}
.corrector-form [role=status] input,.corrector-form [role=status] a {display:block;margin-top:7px}
@media(max-width:650px){
  .corrector-table thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .corrector-table tr {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;padding:10px 0;border-block-end:var(--border)}
  .corrector-table td {display:block;height:auto;padding:0;border:0;overflow-wrap:anywhere}
  .corrector-table td:nth-child(1) {grid-area:1/1}.corrector-table td:nth-child(2) {grid-area:2/1}
  .corrector-table td:nth-child(3) {grid-area:3/1;font-size:12px;color:var(--subtle)}
  .corrector-table td:nth-child(4) {grid-area:1/2;text-align:right}
  .corrector-table td:nth-child(5) {grid-area:2/2/4/3;align-self:center}
  .corrector-table tbody {display:block}
}
}

/* El símbolo y las letras comparten las proporciones del SVG original. */
.ct-brand {display:inline-flex;align-items:center;width:max-content;max-width:100%;font-size:32px;text-decoration:none;border-radius:var(--radius);line-height:1}
.ct-brand-window {display:block;overflow:hidden}
.ct-brand-art {display:block;width:auto;height:1em;max-width:none}
#home.nav-compact .ct-brand-window {width:1.013em}
@media(prefers-reduced-motion:no-preference){
  #home:not(.nav-compact) .nav-brand .ct-brand-mark rect {animation:ct-brand-ink .48s ease-out}
  .ct-brand-mark rect {transition:fill .18s ease-out}
  .ct-brand:is(:hover,:focus-visible) .ct-brand-mark rect {fill:#cb0779}
  @keyframes ct-brand-ink {0%,100%{fill:#ea088c}45%{fill:#fa489f}}
}
.ct-brand:focus-visible,.ct-masthead nav a:focus-visible {outline:2px solid var(--focus);outline-offset:5px}

.ct-public {margin:0;min-height:100vh;background:var(--canvas);color:var(--ink);font:400 16px/1.5 var(--font-ui)}
.ct-public *, .ct-public *::before, .ct-public *::after,.ct-masthead * {box-sizing:border-box}
.ct-masthead {box-sizing:border-box;flex:none;width:100%;max-width:var(--public-max);margin-inline:auto;padding-inline:var(--public-gutter);height:clamp(72px,7vw,96px);display:flex;align-items:center;justify-content:space-between;position:relative}
.ct-masthead::after {content:"";position:absolute;bottom:0;inset-inline:var(--public-gutter);border-bottom:var(--border)}
.ct-masthead .ct-brand {font-size:clamp(28px,2.55vw,37px)}
.ct-masthead nav {display:flex;align-items:center;gap:clamp(18px,3vw,42px);font-family:var(--font-ui)}
.ct-masthead nav a {padding:10px 0;color:var(--ink);font-size:15px;font-weight:560;line-height:1.4;text-decoration:none}
.ct-masthead nav a:is(:hover,[aria-current=page]) {text-decoration:underline;text-underline-offset:6px;text-decoration-color:var(--teal);color:var(--teal)}
.ct-masthead nav span {margin-left:3px}
.ct-hero,.ct-plans {max-width:var(--public-max);margin-inline:auto;padding-inline:var(--public-gutter)}
.ct-hero {display:grid;grid-template-columns:.85fr 1.15fr;align-items:stretch;gap:clamp(24px,4vw,78px);padding-block:clamp(30px,5vh,65px)}
.ct-hero .intro {align-self:center;padding:32px 0}
.ct-hero .category {font-size:clamp(12px,1.2vw,15px);font-weight:600;letter-spacing:.02em;margin:0 0 clamp(24px,4vh,48px);color:var(--teal)}
.ct-display {font:550 clamp(44px,5.65vw,96px)/.99 var(--font-ui);letter-spacing:-.068em;margin:0}
.ct-display span {display:block;white-space:nowrap}
.ct-display em {font-family:var(--font-display);font-weight:400;letter-spacing:-.075em;color:var(--teal)}
.ct-hero .description,.ct-plan-intro p,.ct-register p {color:var(--subtle);line-height:1.55}
.ct-hero .description {max-width:34ch;font-size:clamp(16px,1.35vw,21px);letter-spacing:-.016em;margin:clamp(24px,4vh,36px) 0}
.ct-hero figure {margin:0;min-width:0;overflow:hidden;background:var(--soft);border-radius:var(--radius-lg);height:clamp(440px,71svh,760px)}
.ct-hero figure img {width:100%;height:100%;object-fit:cover;object-position:54% 50%;display:block}

.ct-cta {display:inline-flex;align-items:center;justify-content:center;gap:24px;min-height:44px;padding:12px 20px;border:1px solid transparent;border-radius:var(--radius);font:600 15px/1.3 var(--font-ui);cursor:pointer;text-decoration:none}
.ct-cta,.ct-workshop button.primary,.ct-workshop .account-page main a.primary-link,
body[data-path] .login-content .es-button[data-variant=solid] {background:var(--primary);color:var(--on-primary);border-color:var(--primary)}
.ct-cta:is(:hover,:focus-visible):not(:disabled),.ct-workshop button.primary:is(:hover,:focus-visible):not(:disabled),
.ct-workshop .account-page main a.primary-link:is(:hover,:focus-visible),body[data-path] .login-content .es-button[data-variant=solid]:is(:hover,:focus-visible):not(:disabled) {background:var(--primary-hover);color:var(--on-primary);border-color:var(--primary-hover)}
.ct-cta:disabled {opacity:.62;cursor:wait}
.ct-cta:focus-visible,.ct-fields input:focus-visible {outline:2px solid var(--focus);outline-offset:3px}
.ct-cta span {font-size:1.25em;line-height:1}
.ct-plans {padding-block:clamp(32px,4vw,68px) clamp(48px,6vw,84px)}
.ct-plan-intro {display:flex;align-items:end;justify-content:space-between;gap:30px;margin-bottom:clamp(24px,3vw,42px)}
.ct-plan-intro .ct-display {font-size:clamp(42px,4.7vw,78px)}
.ct-plan-intro p {max-width:36ch;margin:0;font-size:16px}
.ct-plan-list {min-width:0;margin:0;padding:0;border:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(12px,1.4vw,22px)}
.ct-sr-only {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.ct-plan-card {display:block;min-width:0;padding:clamp(20px,2vw,32px);border:1px solid var(--line-strong);border-radius:var(--radius-lg);background:var(--paper);color:var(--ink);cursor:pointer}
.ct-plan-card:hover {border-color:var(--teal)}
.ct-plan-card:has(input:checked) {background:var(--teal);color:var(--on-primary);border-color:var(--teal)}
.ct-plan-card:has(input:focus-visible) {outline:3px solid var(--focus);outline-offset:4px}
.ct-plan-name {display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:clamp(20px,1.55vw,26px);font-weight:600;line-height:1.25;letter-spacing:-.04em}
.ct-plan-name input {appearance:none;flex:none;display:grid;place-items:center;width:21px;height:21px;margin:0;border:1.5px solid var(--line-strong);border-radius:50%;cursor:pointer}
.ct-plan-name input:checked {border-color:currentColor;color:var(--on-primary)}
.ct-plan-name input:checked::after {content:"";width:9px;height:9px;border-radius:50%;background:currentColor}
.ct-price {display:flex;align-items:baseline;gap:6px;margin:19px 0;color:inherit;font-variant-numeric:tabular-nums}
.ct-price span {font-size:14px}
.ct-price strong {font-size:clamp(36px,3.4vw,54px);font-weight:550;line-height:1;letter-spacing:-.065em}
.ct-plan-features {display:grid;gap:7px;padding-top:18px;border-top:1px solid var(--line);font-size:14px;line-height:1.4}
.ct-plan-card:has(input:checked) .ct-plan-features {border-color:rgb(255 255 255/.35)}
.ct-plan-features>span {display:flex;align-items:baseline;gap:9px}
.ct-plan-features>span::before {content:"";width:8px;height:5px;flex:none;align-self:flex-start;margin-top:.45em;border-left:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg)}
.ct-register {margin-top:clamp(28px,3.7vw,64px);padding-top:clamp(22px,2.5vw,42px);border-top:var(--border);display:grid;grid-template-columns:1fr 2fr;gap:clamp(18px,3vw,48px)}
.ct-register h2 {margin:0;font:580 clamp(22px,2vw,32px)/1.2 var(--font-ui);letter-spacing:-.045em}
.ct-register p {font-size:14px;margin:9px 0 0;max-width:37ch}
.ct-fields {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.ct-fields label {font-size:13px;font-weight:560;color:var(--ink)}
.ct-fields input {display:block;width:100%;min-height:43px;margin-top:6px;padding:9px 11px;background:var(--paper);border:1px solid var(--line-strong);border-radius:var(--radius);color:var(--ink);font:inherit}
.ct-register .ct-cta {margin-top:16px}
@media(max-width:1050px){
  .ct-plan-list {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:840px){
  .ct-register {grid-template-columns:1fr}
  .ct-plan-intro {display:block}
  .ct-plan-intro p {margin-top:14px;max-width:48ch}
}
@media(max-width:760px){
  .ct-hero {grid-template-columns:1fr;gap:28px;padding-block:30px 22px}
  .ct-hero .intro {padding:8px 0 0}
  .ct-hero .category {margin-bottom:18px}
  .ct-hero .ct-display {font-size:clamp(44px,14vw,80px)}
  .ct-hero .description {margin:19px 0 22px;max-width:42ch}
  .ct-hero figure {height:auto;aspect-ratio:1.58}
}
@media(max-width:600px){
  .ct-fields,.ct-plan-list {grid-template-columns:1fr}
  .ct-plan-card {padding:19px 21px}
  .ct-price {margin:14px 0}
}
@media(forced-colors:active){
  .ct-plan-name input {appearance:auto}
  .ct-plan-card:has(input:checked) {outline:2px solid Highlight}
}

/* Formularios nativos de Frappe. El inicio, la recuperación y el segundo factor
   siguen usando sus propios controladores y las mismas variables del taller. */
body[data-path] {font-family:var(--font-ui);color:var(--ink);--primary-color:var(--primary);--text-color:var(--ink);--btn-primary:var(--primary);--border-color:var(--line)}
body:is([data-path=login],[data-path=update-password]) {background:var(--canvas)}
body:is([data-path=login],[data-path=update-password]) .login-content.page-card {border:var(--border);border-radius:var(--radius-lg);background:var(--paper);box-shadow:0 12px 40px rgb(30 48 35/.05)}
body:is([data-path=login],[data-path=update-password]) .page-card-head .app-logo {display:none}
body:is([data-path=login],[data-path=update-password]) .page-card-head h4 {color:var(--ink);letter-spacing:-.045em}
body:is([data-path=login],[data-path=update-password]) .login-content .form-control {min-height:42px;color:var(--ink);background:var(--surface-soft);border:1px solid var(--line-strong);border-radius:var(--radius)}
body:is([data-path=login],[data-path=update-password]) .login-content :is(input,button,a):focus-visible {outline:2px solid var(--focus);outline-offset:2px}
body:is([data-path=login],[data-path=update-password]) .login-content .es-button {min-height:42px;border-radius:var(--radius);font:550 14px/1.3 var(--font-ui)}
body[data-path] .login-content a:not(.es-button) {color:var(--teal)}

/* Portada pública: recorrido por el editor y preparación del empaque. */
.ct-hero-actions {display:flex;align-items:center;flex-wrap:wrap;gap:16px 24px}
.ct-hero-actions>a:not(.ct-cta) {color:var(--teal);text-decoration:underline;text-underline-offset:4px;font:600 14px/1.45 var(--font-ui)}
.ct-hero-actions>a:focus-visible {outline:2px solid var(--focus);outline-offset:4px}
.ct-page-band {max-width:var(--public-max);margin-inline:auto;padding:clamp(38px,6vw,88px) var(--public-gutter)}
.ct-section-intro,.ct-handoff {display:grid;grid-template-columns:1.3fr 1fr;align-items:end;gap:clamp(20px,5vw,92px)}
.ct-section-intro h2,.ct-handoff h2 {margin:0;font:550 clamp(34px,4.4vw,72px)/1.04 var(--font-ui);letter-spacing:-.062em}
.ct-section-intro em,.ct-handoff em {font:italic 400 1em/1 var(--font-display);color:var(--teal)}
.ct-section-intro p,.ct-tour-copy p,.ct-process p,.ct-handoff p {margin:0;color:var(--subtle);font-size:clamp(15px,1.12vw,18px);line-height:1.58}
.ct-tour {border-block:var(--border);background:var(--surface-soft)}
.ct-tour-tabs {display:flex;gap:6px;flex-wrap:wrap;margin:clamp(24px,3vw,44px) 0 16px}
.ct-tour-tabs button {font:600 14px/1.35 var(--font-ui);padding:9px 17px;border-radius:99px;color:var(--ink);background:transparent;border:1px solid var(--line-strong);cursor:pointer}
.ct-tour-tabs button:hover {background:var(--tint)}
.ct-tour-tabs button[aria-selected=true] {color:var(--on-primary);border-color:var(--primary);background:var(--primary)}
.ct-tour-tabs button:focus-visible {outline:2px solid var(--focus);outline-offset:3px}
.ct-tour-view {padding:clamp(16px,2.25vw,36px);display:grid;grid-template-columns:minmax(0,.58fr) minmax(0,1.42fr);align-items:center;gap:clamp(20px,3.5vw,62px);border:var(--border);border-radius:var(--radius-lg);background:var(--paper)}
.ct-tour-view+.ct-tour-view {margin-top:14px}
.ct-tour [hidden] {display:none}
.ct-tour-copy h3,.ct-process h2 {margin:0 0 12px;font:570 clamp(23px,2.5vw,39px)/1.1 var(--font-ui);letter-spacing:-.045em}
.ct-tour-copy p {margin-bottom:20px}
.ct-tour-view img {display:block;width:100%;height:auto;border:var(--border);border-radius:var(--radius)}
.ct-process {display:grid;grid-template-columns:1fr 1fr;gap:clamp(24px,4.7vw,76px)}
.ct-process img {display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:var(--radius-lg);margin-bottom:clamp(19px,2vw,30px)}
.ct-process p,.ct-handoff p {max-width:57ch}
.ct-tour-image:focus-visible {outline:2px solid var(--focus);outline-offset:4px}
.ct-handoff {align-items:center;background:var(--tint);border-top:var(--border)}
.ct-handoff h2 {font-size:clamp(30px,3.6vw,58px);margin-bottom:18px}
.ct-handoff .ct-cta {margin-top:18px}
@media(max-width:780px){
  .ct-section-intro,.ct-handoff,.ct-tour-view {grid-template-columns:1fr}
  .ct-tour-copy p {margin-bottom:12px}
  .ct-tour-tabs button {padding:8px 12px}
  .ct-handoff {gap:18px}
}
@media(max-width:600px){
  .ct-process {grid-template-columns:1fr;gap:32px}
  .ct-tour-tabs {gap:5px}
}
.ct-workshop .profile-access {max-width:34rem;margin:22px 0;padding-top:16px;border-top:var(--border)}
.ct-workshop .profile-access a {display:inline-flex;min-height:36px;align-items:center;color:var(--teal);font-weight:600;text-underline-offset:4px}
