@font-face { font-family: "Playwrite US Trad"; src: url("/assets/fonts/worksheet/playwrite-us-trad.ttf") format("truetype"); font-style: normal; font-weight: 100 400; font-display: swap; }
@font-face { font-family: "Playwrite US Modern"; src: url("/assets/fonts/worksheet/playwrite-us-modern.ttf") format("truetype"); font-style: normal; font-weight: 100 400; font-display: swap; }
.worksheet-icon { display: inline-block; width: 18px; height: 18px; flex: 0 0 18px; background: currentColor; mask: var(--icon) center / contain no-repeat; }
#worksheetPrintPages { display: none; }
@media print {
  body.worksheet-page.worksheet-phone-flow .workspace > .worksheet-mobile-flow { display: block !important; padding: 0 !important; border: 0 !important; }
  body.worksheet-page.worksheet-phone-flow .worksheet-mobile-flow > * { display: none !important; }
  body.worksheet-page.worksheet-phone-flow .worksheet-mobile-flow > [data-step="2"] { display: block !important; padding: 0 !important; }
  body.worksheet-page.worksheet-phone-flow .worksheet-mobile-flow [data-step="2"] > :not(.worksheet-mobile-preview-slot) { display: none !important; }
  body.worksheet-page .worksheet-preview > :not(#worksheetPrintPages) { display: none !important; }
  body.worksheet-page #worksheetPrintPages { display: block; }
  .worksheet-printed-page { display: block; break-after: page; break-inside: avoid; overflow: hidden; }
  .worksheet-printed-page:last-child { break-after: auto; }
  .worksheet-printed-page canvas { display: block; width: 100%; height: 100%; }
}
@media screen {
  body.worksheet-page { --ws-border: #d6dbd9; --ws-muted: #58636a; --ws-ink: #20292f; --ws-workbench: #edf0ee; --ws-accent: #1a6078; color: var(--ws-ink); }
  .worksheet-page .content-page { width: 100%; max-width: 1328px; margin: 0 auto; padding: 28px 24px 48px; gap: 28px; }
  .worksheet-page .site-header { min-height: 64px; border-bottom-color: var(--ws-border); }
  .worksheet-page .site-nav a[aria-current="page"] { color: var(--ws-accent); box-shadow: 0 2px var(--ws-accent); }
  body.worksheet-page .tool-hero { display: block; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  body.worksheet-page .tool-hero::before, .worksheet-page .input-card::before { content: none; }
  body.worksheet-page .tool-hero h1 { max-width: none; margin: 0; font-size: 34px; line-height: 1.18; letter-spacing: 0; color: #242b2d; }
  .worksheet-page .lede { max-width: 850px; margin: 8px 0 0; font-size: 16px; line-height: 1.55; color: var(--ws-muted); }
  .worksheet-page .worksheet-app { display: block; margin: 0; min-width: 0; border: 1px solid var(--ws-border); border-radius: 8px; background: #fff; overflow: clip; }
  .worksheet-app .workspace { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 0; min-width: 0; align-items: stretch; }
  .worksheet-editor { padding: 24px 20px; min-width: 0; border-right: 1px solid var(--ws-border); }
  .worksheet-app [hidden] { display: none !important; }
  .worksheet-template-picker { margin: 0 0 16px; }
  .worksheet-template-picker label, .worksheet-field label, .worksheet-text-fields label { display: block; color: var(--ws-ink); font: 600 14px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; margin-bottom: 7px; }
  body.utility-ui.worksheet-page .worksheet-app select {
    display: inline-block; width: 100%; height: 44px; min-height: 44px; padding: 8px 36px 8px 12px;
    border: 2px solid var(--ink, #14142b); border-radius: 10px; background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2314142b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 16px 16px;
    appearance: none; -webkit-appearance: none; color: var(--ink, #14142b); font-size: 15px; font-weight: 600; line-height: 1.25;
  }
  body.utility-ui.worksheet-page .worksheet-app select::picker-icon { display: none; }
  body.utility-ui.worksheet-page .worksheet-app :is(select, input:not([type="range"]), textarea):focus-visible {
    outline: 3px solid var(--highlight, #ffe14d); outline-offset: 0; border-color: var(--accent, #1d3fd8);
  }
  .worksheet-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--ws-border); margin-bottom: 24px; }
  .worksheet-tabs button { min-height: 44px; padding: 10px 6px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--ws-muted); font-size: 14px; font-weight: 600; border-radius: 0; }
  .worksheet-tabs button[aria-selected="true"] { color: var(--ws-accent); border-bottom-color: var(--ws-accent); }
  .worksheet-editor-nav { min-width: 0; }
  .worksheet-mobile-flow { display: none; }
  .worksheet-clear-label { display: none; }
  .worksheet-preview-jump, .worksheet-edit-jump { display: none; }
  .worksheet-app .worksheet-hint { margin: 0 0 8px; color: var(--ws-muted); font: 12px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
  .worksheet-app .worksheet-field .worksheet-hint { margin: 5px 0 0; }
  .worksheet-app .worksheet-settings-hint { flex-basis: 100%; margin: 4px 0 0; }
  .worksheet-tab-panel { min-width: 0; }
  .worksheet-mobile-flow .worksheet-desktop-only { display: none !important; }
  .worksheet-app { --ws-rail-height: calc(clamp(360px, calc(100svh - 360px), 720px) + 188px); }
  .worksheet-app .workspace { grid-template-columns: 360px minmax(0, 1fr); }
  .worksheet-editor { display: flex; flex-direction: column; height: var(--ws-rail-height); min-height: 0; padding: 0; }
  .worksheet-guide-header { flex: 0 0 auto; padding: 20px 20px 12px; }
  .worksheet-app .worksheet-guide-header h2 { margin: 0 0 6px; color: var(--ws-ink); font: 650 20px/1.3 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.35px; }
  .worksheet-guide-header p { margin: 0; color: var(--ws-muted); font-size: 13px; line-height: 1.5; }
  .worksheet-editor > .worksheet-editor-nav { flex: 0 0 auto; padding: 0 16px; }
  .worksheet-editor .worksheet-tabs { margin: 0; }
  .worksheet-editor .worksheet-tabs button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 50px; padding: 8px 2px; font-size: 13px; font-weight: 500; transition: none; }
  .worksheet-editor .worksheet-tabs [aria-selected="true"] { font-weight: 650; }
  .worksheet-editor .worksheet-tabs button:hover:not(:disabled) { background: #fff; }
  .worksheet-guide-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px; scrollbar-width: thin; }
  body.utility-ui.worksheet-page .worksheet-editor details.worksheet-guide-more { margin: 0; padding: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
  .worksheet-editor .worksheet-guide-more > summary { display: flex; align-items: center; justify-content: flex-start; gap: 9px; min-height: 40px; padding: 8px 0; color: var(--ws-muted); list-style: none; font-size: 13px; font-weight: 400; line-height: 1.4; }
  .worksheet-guide-more > summary::-webkit-details-marker { display: none; }
  .worksheet-editor .worksheet-guide-more > summary::after { display: none; }
  .worksheet-guide-more > summary .worksheet-icon { width: 16px; height: 16px; flex-basis: 16px; transform: rotate(90deg); }
  .worksheet-guide-more[open] > summary .worksheet-icon { transform: rotate(-90deg); }
  .worksheet-editor .worksheet-writing-details { border-top: 1px solid var(--ws-border); }
  .worksheet-editor .worksheet-guide-saved { border-top: 1px solid var(--ws-border); }
  .worksheet-app .worksheet-editor .field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; margin-bottom: 6px; }
  .worksheet-editor .field-head label { margin: 0; font-size: 14px; font-weight: 600; }
  .worksheet-app .worksheet-guide-example { flex-shrink: 0; min-height: 30px; padding: 4px 0; border: 0; background: #fff; color: var(--ws-accent); font-size: 12px; font-weight: 500; }
  .worksheet-editor #worksheetTextHint, .worksheet-editor #charCount { display: none; }
  .worksheet-editor .worksheet-input-meta { margin: 8px 0 0; min-height: 44px; }
  .worksheet-guide-entry-count { color: var(--ws-muted); font-size: 12px; }
  .worksheet-guide-validation { margin: 4px 0 10px; padding: 8px 10px; border-left: 3px solid #a43d30; background: #fff2ef; color: #8b3024; font-size: 13px; line-height: 1.5; }
  .worksheet-editor #clearText { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 4px 3px; font-size: 12px; }
  .worksheet-editor .worksheet-clear-label { display: inline; }
  .worksheet-guide-tip { margin: 18px 0 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--ws-accent); color: var(--ws-muted); font-size: 13px; line-height: 1.6; white-space: pre-line; }
  .worksheet-editor #worksheetPanel-style { gap: 18px; }
  .worksheet-editor #fontSize { width: calc(100% - 44px); margin-inline: 22px; }
  .worksheet-editor .worksheet-guide-scale { display: flex; justify-content: space-between; align-items: center; height: 32px; margin-top: -32px; margin-bottom: 27px; color: var(--ws-muted); pointer-events: none; }
  .worksheet-guide-scale span:first-child { font-size: 12px; }
  .worksheet-guide-scale span:last-child { font-size: 20px; }
  .worksheet-editor label[for="fontSize"] { display: grid; grid-template-columns: 1fr; justify-items: start; gap: 8px; }
  .worksheet-editor label[for="fontSize"] output { min-width: 64px; min-height: 40px; padding: 8px 10px; border: 1px solid #c6cece; border-radius: 6px; color: var(--ws-ink); font-size: 16px; font-weight: 400; }
  .worksheet-editor .worksheet-writing-details { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--ws-border); }
  .worksheet-writing-details[open] > .worksheet-field { margin: 14px 0 0; }
  .worksheet-writing-details > .worksheet-hint { margin-top: 10px; }
  .worksheet-editor #worksheetPanel-style > .worksheet-guide-tip { margin-top: 0; }
  .worksheet-guide-auto-rows { display: none; }
  .worksheet-editor .worksheet-auto-layout #lineCount, .worksheet-editor .worksheet-auto-layout #worksheetLinesValue { display: none; }
  .worksheet-editor .worksheet-auto-layout .worksheet-guide-auto-rows { display: block; min-height: 44px; padding: 10px; border: 1px solid var(--ws-border); border-radius: 6px; background: #f1f3f4; color: #8b959a; font-size: 16px; }
  .worksheet-guide-footer { flex: 0 0 auto; margin-top: auto; padding: 14px 20px 4px; border-top: 1px solid var(--ws-border); }
  .worksheet-app .worksheet-guide-next { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; padding: 12px 34px; border: 1px solid var(--ws-accent); border-radius: 6px; background: var(--ws-accent); color: #fff; font-size: 14px; font-weight: 650; text-align: center; }
  .worksheet-guide-next .worksheet-icon { position: absolute; right: 14px; }
  .worksheet-app .worksheet-guide-next:hover:not(:disabled) { background: #124b60; color: #fff; }
  .worksheet-editor .worksheet-guide-saved { margin-top: 12px; padding-top: 2px; border-top: 1px solid var(--ws-border); }
  .worksheet-editor .worksheet-guide-saved > .worksheet-print-actions { margin: 0; padding: 4px 0 12px; border: 0; }
  @media (min-width: 761px) and (max-width: 1100px) {
    .worksheet-app { --ws-rail-height: calc(clamp(360px, calc(100svh - 360px), 720px) + 222px); }
    .worksheet-app .worksheet-editor { padding: 0; }
    .worksheet-guide-body, .worksheet-guide-header { padding-inline: 16px; }
    .worksheet-guide-footer { padding-inline: 16px; }
  }
  #worksheetPanel-style, #worksheetPanel-page { display: grid; gap: 16px; }
  .worksheet-app .input-card { position: static; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  .worksheet-text-fields { display: grid; gap: 12px; }
  .worksheet-text-fields:has(#worksheetJoinsField:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
  .worksheet-text-fields > div { min-width: 0; }
  .worksheet-app .field-head { display: block; padding: 0; margin: 0; min-height: 28px; }
  .worksheet-app .input-row { display: block; margin: 0; }
  .worksheet-app #sourceText, .worksheet-app #worksheetJoins { display: block; width: 100%; min-height: 136px; height: 136px; padding: 12px; resize: vertical; border: 1px solid #c6cece; border-radius: 6px; background: #fff; color: var(--ws-ink); font: 16px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
  .worksheet-app .input-guidance:empty { display: none; }
  .worksheet-input-meta { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 4px; min-height: 44px; }
  .worksheet-input-meta #charCount { font-size: 12px; color: var(--ws-muted); }
  .worksheet-app #clearText { width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ws-muted); }
  .worksheet-app .preset-row { display: flex; flex-wrap: wrap; gap: 0 8px; margin: 0; }
  .worksheet-app .preset-row button { min-height: 44px; margin: 0; padding: 8px 2px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--ws-muted); font-size: 13px; }
  .worksheet-app .preset-row button[aria-pressed="true"] { border-bottom-color: var(--ws-accent); color: var(--ws-accent); font-weight: 600; }
  .worksheet-field { min-width: 0; }
  .worksheet-field label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .worksheet-field output { color: var(--ws-accent); font-weight: 600; font-variant-numeric: tabular-nums; }
  .worksheet-field input[type="range"] { display: block; width: 100%; height: 32px; margin: 0; accent-color: var(--ws-accent); cursor: pointer; }
  .worksheet-field:has(input:disabled) { opacity: .55; }
  .worksheet-field input:disabled { cursor: not-allowed; }
  .worksheet-field .swatches { gap: 14px; margin: 0; padding: 4px; }
  .worksheet-field .swatch { width: 44px; height: 44px; box-shadow: inset 0 0 0 5px #fff; border: 1px solid var(--ws-border); }
  .worksheet-field .swatch.active { outline: 2px solid var(--ws-accent); outline-offset: 2px; }
  .worksheet-app .worksheet-print-actions { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--ws-border); }
  .worksheet-app .worksheet-print-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; min-height: 44px; margin: 0; padding: 6px 2px; border: 0; background: none; color: var(--ws-muted); font-size: 12px; box-shadow: none; }
  .worksheet-app .worksheet-print-actions .worksheet-icon { width: 16px; height: 16px; flex-basis: 16px; }
  .worksheet-app .worksheet-preview { position: relative; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
  .worksheet-app .worksheet-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 0; padding: 14px 20px; border-bottom: 1px solid var(--ws-border); }
  .worksheet-preview-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
  .worksheet-app .worksheet-toolbar h2 { margin: 0; font: 600 18px/1.4 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: 0; color: var(--ws-ink); }
  #worksheetMetadata { color: var(--ws-muted); font-size: 12px; white-space: nowrap; }
  .worksheet-output-actions { display: flex; gap: 8px; }
  .worksheet-app .worksheet-output-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-height: 44px; margin: 0; padding: 10px 14px; border: 1px solid var(--ws-accent); border-radius: 6px; background: #fff; color: var(--ws-accent); font-size: 14px; font-weight: 600; white-space: nowrap; }
  .worksheet-app .worksheet-output-actions .primary { background: var(--ws-accent); color: #fff; }
  .worksheet-feedback { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 20px; min-height: 30px; border-bottom: 1px solid #e0e5e2; background: #f7f9f8; }
  .worksheet-feedback:has(#statusText:empty):has(#worksheetRenderStatus:empty) { display: none; }
  .worksheet-app #statusText, #worksheetRenderStatus { margin: 0; color: var(--ws-muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
  #worksheetRenderStatus:empty { display: none; }
  #worksheetViewport { height: clamp(360px, calc(100svh - 360px), 720px); overflow: auto; overscroll-behavior: contain; background: var(--ws-workbench); scrollbar-gutter: stable; }
  #worksheetPaperPreview { display: grid; place-items: center; min-width: 100%; min-height: 100%; width: max-content; padding: 24px; }
  #worksheetPaperPreview canvas { display: block; max-width: none; height: auto; background: #fff; border: 0; box-shadow: 0 2px 5px #172c2814, 0 8px 22px #172c2814; }
  .worksheet-direct-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 4px 20px; border-bottom: 1px solid var(--ws-border); }
  .worksheet-direct-bar p { margin: 0; color: var(--ws-muted); font-size: 12px; line-height: 1.5; }
  .worksheet-app .worksheet-direct-bar button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 6px; color: var(--ws-accent); background: #fff; font-size: 13px; font-weight: 600; }
  .worksheet-paper-sheet { position: relative; width: max-content; }
  .worksheet-edit-layer { position: absolute; inset: 0; pointer-events: none; }
  .worksheet-app .worksheet-edit-target { position: absolute; display: block; min-width: 0; min-height: 0; padding: 0; border: 1px dashed #9bbfc5; border-radius: 2px; background: transparent; box-shadow: none; pointer-events: auto; cursor: text; }
  .worksheet-app .worksheet-edit-target:hover, .worksheet-app .worksheet-edit-target:focus-visible { border: 2px solid var(--ws-accent); background: #1a60780a; outline: 2px solid #fff; outline-offset: 1px; }
  .worksheet-edit-target > span { position: absolute; right: 0; top: -9px; display: block; padding: 1px 5px; background: #fff; color: var(--ws-accent); font: 500 10px/1.4 Inter, ui-sans-serif, system-ui, sans-serif; white-space: nowrap; }
  .worksheet-app .worksheet-inline-editor { position: absolute; z-index: 10; right: 20px; width: min(420px, calc(100% - 40px)); max-height: min(520px, 70svh); overflow: auto; padding: 18px; border: 1px solid #a9c7cf; border-radius: 6px; background: #fff; box-shadow: 0 5px 22px #172c2826; }
  .worksheet-inline-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
  .worksheet-app .worksheet-inline-heading h3 { margin: 0; color: var(--ws-ink); font: 650 17px/1.4 Inter, ui-sans-serif, system-ui, sans-serif; }
  .worksheet-app .worksheet-inline-heading button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; padding: 8px; border: 1px solid var(--ws-border); border-radius: 6px; background: #fff; color: var(--ws-muted); }
  .worksheet-inline-editor label { display: block; margin: 12px 0 6px; color: var(--ws-ink); font-size: 13px; font-weight: 600; }
  .worksheet-inline-editor label span { color: var(--ws-muted); font-weight: 400; }
  .worksheet-app .worksheet-inline-editor :is(input, textarea) { display: block; width: 100%; min-height: 44px; margin: 0; padding: 10px; border: 1px solid #b7c3c6; border-radius: 6px; background: #fff; color: var(--ws-ink); font: 400 16px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
  .worksheet-inline-editor textarea { min-height: 112px; resize: vertical; }
  .worksheet-inline-field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .worksheet-app .worksheet-inline-field-head button { min-height: 44px; padding: 6px 0 6px 6px; border: 0; background: #fff; color: var(--ws-accent); font-size: 12px; }
  .worksheet-inline-editor .worksheet-inline-help { margin: 12px 0 0; color: var(--ws-muted); font-size: 12px; line-height: 1.6; }
  #worksheetInlineError { margin: 10px 0; color: #8b3024; font-size: 13px; }
  .worksheet-inline-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; }
  .worksheet-app .worksheet-inline-actions button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--ws-border); border-radius: 6px; background: #fff; color: var(--ws-accent); font-size: 13px; font-weight: 600; }
  .worksheet-app .worksheet-inline-actions .primary { margin-left: auto; border-color: var(--ws-accent); background: var(--ws-accent); color: #fff; }
  .worksheet-preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--ws-border); }
  .worksheet-pagination, .worksheet-zoom { display: flex; align-items: center; gap: 6px; }
  .worksheet-pagination output { max-width: 190px; font-size: 12px; color: var(--ws-muted); text-align: center; }
  #worksheetZoomValue { width: 40px; text-align: center; color: var(--ws-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
  .worksheet-pagination button, .worksheet-zoom button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--ws-border); border-radius: 6px; background: #fff; color: var(--ws-ink); }
  #worksheetZoomFit[aria-pressed="true"] { background: #edf5f6; color: var(--ws-accent); border-color: #a9c7cf; }
  #worksheetError { margin: 0; padding: 16px 20px; border-bottom: 1px solid #e3b5b0; background: #fff2ef; color: #8b3024; font-size: 14px; line-height: 1.6; }
  .worksheet-preview[data-ready="error"] #worksheetViewport { height: 200px; }
  .worksheet-app button { cursor: pointer; transition: background-color .12s ease, border-color .12s ease; letter-spacing: 0; }
  .worksheet-app button:hover:not(:disabled) { background-color: #edf5f6; color: var(--ws-accent); }
  .worksheet-app .worksheet-output-actions .primary:hover:not(:disabled) { background: #124b60; color: #fff; }
  .worksheet-page :is(button, a, select, textarea, input, summary, [tabindex]):focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 3px; }
  .worksheet-app button:disabled { opacity: .45; cursor: not-allowed; }
  .worksheet-app button[aria-busy="true"] .worksheet-icon { opacity: .6; }
  .worksheet-page .content-section { margin: 4px 0 0; padding-top: 28px; border-top: 1px solid var(--ws-border); }
  .worksheet-page .content-section h2 { margin: 0 0 20px; font-size: 26px; line-height: 1.3; letter-spacing: 0; }
  .worksheet-reading-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .worksheet-reading-grid > div + div { border-left: 1px solid var(--ws-border); padding-left: 28px; }
  .worksheet-reading-grid h3 { font-size: 17px; margin: 0 0 8px; }
  .worksheet-reading-grid p, .worksheet-page .faq-grid p { margin: 0; color: var(--ws-muted); font-size: 16px; line-height: 1.7; }
  .worksheet-page .faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; align-items: start; }
  .worksheet-page .faq-grid details { margin: 0; padding: 18px 0; border: 0; border-bottom: 1px solid var(--ws-border); border-radius: 0; background: none; box-shadow: none; }
  .worksheet-page .faq-grid summary { padding: 0 28px 0 0; font-size: 16px; line-height: 1.5; }
  .worksheet-page .faq-grid details[open] summary { margin-bottom: 12px; }
  .worksheet-page .worksheet-related { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .worksheet-page .worksheet-related .feature { min-height: 0; padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--ws-border); border-radius: 0; background: none; box-shadow: none; }
  .worksheet-related .feature strong { font-size: 18px; letter-spacing: 0; }
  .worksheet-related .feature span { font-size: 15px; line-height: 1.6; }
  .worksheet-table-wrap { margin: 16px 0; border: 2px solid var(--ink, #14142b); border-radius: 14px; background: var(--surface, #fff); box-shadow: var(--shadow, 4px 4px 0 #14142b); overflow: hidden; }
  .worksheet-spec-table { width: 100%; border-collapse: collapse; text-align: left; }
  .worksheet-spec-table th, .worksheet-spec-table td { padding: 14px 16px; border-bottom: 2px dashed var(--line-soft, #d9dbe8); vertical-align: top; line-height: 1.55; font-size: 15px; }
  .worksheet-spec-table thead th { background: var(--highlight-soft, #fff6c2); border-bottom: 2px solid var(--ink, #14142b); color: var(--ink, #14142b); font-weight: 800; }
  .worksheet-spec-table tbody tr:last-child td { border-bottom: 0; }
  .worksheet-spec-table td:first-child { color: var(--ink, #14142b); font-weight: 700; }
  .worksheet-spec-table td { color: var(--muted, #4a4a63); }
  .worksheet-spec-table tbody tr[data-template-row] { cursor: pointer; transition: background-color .12s ease; }
  .worksheet-spec-table tbody tr[data-template-row]:hover { background: #fbfbf4; }
  .worksheet-spec-table tbody tr[data-template-row].is-active { background: #fffbe0; }
  .worksheet-spec-table tbody tr[data-template-row].is-active td:first-child { box-shadow: inset 4px 0 var(--accent, #1d3fd8); }
  .worksheet-template-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  .worksheet-template-action {
    display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 4px 12px;
    border: 2px solid var(--ink, #14142b); border-radius: 8px; background: var(--highlight, #ffe14d);
    color: var(--ink, #14142b); font-size: 13px; font-weight: 700; box-shadow: var(--shadow-sm, 2px 2px 0 #14142b);
    cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
  }
  .worksheet-template-action:hover { background: #ffd91a; transform: translate(-1px, -1px); box-shadow: var(--shadow-md, 3px 3px 0 #14142b); }
  .worksheet-template-action[aria-pressed="true"] { background: var(--accent, #1d3fd8); color: #fff; }
  .worksheet-steps { margin: 14px 0 0; padding-left: 22px; color: var(--muted, #4a4a63); line-height: 1.65; }
  .worksheet-steps li + li { margin-top: 10px; }
  .worksheet-steps strong { color: var(--ink, #14142b); }
  @media (max-width: 1100px) and (min-width: 761px) {
    .worksheet-app .workspace { grid-template-columns: 300px minmax(0, 1fr); }
    .worksheet-editor { padding: 20px 16px; }
    .worksheet-app .worksheet-toolbar { padding: 12px; }
    .worksheet-output-actions { width: 100%; }
    .worksheet-app .worksheet-output-actions button { flex: 1; }
    .worksheet-preview-footer { flex-wrap: wrap; justify-content: center; }
    .worksheet-input-meta { margin: 0; }
  }
  @media (max-width: 760px), (max-width: 980px) and (pointer: coarse) {
    .worksheet-direct-bar { align-items: center; gap: 6px; padding: 5px 10px; }
    .worksheet-direct-bar p { font-size: 11px; }
    .worksheet-app .worksheet-direct-bar button { min-height: 44px; padding: 5px; font-size: 12px; }
    .worksheet-direct-bar .worksheet-icon { display: none; }
    .worksheet-app .worksheet-inline-editor { position: fixed; z-index: 30; top: calc(var(--worksheet-header-height, 64px) + 10px) !important; left: 12px; right: 12px; width: auto; max-height: calc(100dvh - var(--worksheet-header-height, 64px) - 120px); padding: 12px; }
    .worksheet-edit-target > span { font-size: 9px; padding: 0 3px; }
    .worksheet-mobile-flow { display: block; min-width: 0; padding-bottom: 96px; }
    .worksheet-mobile-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; list-style: none; margin: 0; padding: 8px; border-bottom: 1px solid var(--ws-border); }
    .worksheet-mobile-steps li { min-width: 0; margin: 0; padding: 0; }
    .worksheet-app .worksheet-mobile-steps button { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; min-height: 48px; padding: 8px 3px; border: 1px solid transparent; border-radius: 6px; background: #fff; color: var(--ws-muted); font-size: 12px; font-weight: 600; }
    .worksheet-app .worksheet-mobile-steps [aria-current="step"] { border-color: #a9c7cf; background: #edf5f6; color: var(--ws-accent); }
    .worksheet-mobile-step { min-width: 0; padding: 16px 12px; }
    .worksheet-mobile-step h2 { margin: 0 0 14px; color: var(--ws-ink); font: 600 22px/1.25 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: 0; }
    .worksheet-mobile-step h3 { margin: 22px 0 10px; font: 600 16px/1.4 Inter, ui-sans-serif, system-ui, sans-serif; }
    .worksheet-mobile-help, .worksheet-mobile-summary, .worksheet-mobile-size-summary { margin: 0 0 16px; color: var(--ws-muted); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
    .worksheet-mobile-types, .worksheet-mobile-sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
    .worksheet-app :is(.worksheet-mobile-types, .worksheet-mobile-sizes) button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 76px; padding: 10px 3px; border: 1px solid var(--ws-border); border-radius: 6px; background: #fff; color: var(--ws-ink); font-size: 14px; }
    .worksheet-mobile-types button span, .worksheet-mobile-sizes button > span:last-child:not(.size-sample) { color: var(--ws-muted); font-size: 11px; }
    .worksheet-app :is(.worksheet-mobile-types, .worksheet-mobile-sizes, .worksheet-mobile-paper) [aria-pressed="true"] { border: 2px solid var(--ws-accent); background: #edf5f6; color: var(--ws-accent); }
    .worksheet-mobile-sizes .size-sample { display: flex; align-items: center; height: 48px; line-height: 1.1; }
    .worksheet-mobile-sizes button { min-height: 112px; }
    .worksheet-mobile-paper { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
    .worksheet-app .worksheet-mobile-paper button { min-height: 52px; padding: 10px; border: 1px solid var(--ws-border); border-radius: 6px; background: #fff; color: var(--ws-ink); font-size: 16px; }
    .worksheet-mobile-content .worksheet-text-fields:has(#worksheetJoinsField:not([hidden])) { grid-template-columns: 1fr; }
    .worksheet-phone-flow .worksheet-mobile-content .preset-row, .worksheet-phone-flow .worksheet-mobile-content #charCount { display: none; }
    .worksheet-mobile-content .worksheet-input-meta { justify-content: flex-end; margin: 0; }
    .worksheet-mobile-flow[data-empty="true"] .worksheet-mobile-content .worksheet-input-meta { display: none; }
    .worksheet-mobile-content .field-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
    .worksheet-mobile-content .field-head label { flex: 1; min-width: 0; margin: 0; }
    .worksheet-mobile-content #clearText { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; padding: 4px 6px; font-size: 13px; }
    .worksheet-mobile-content .worksheet-clear-label { display: inline; }
    .worksheet-mobile-content #sourceText { min-height: 88px; height: 88px; }
    .worksheet-app .worksheet-example-button { min-height: 44px; padding: 8px 0; border: 0; background: none; color: var(--ws-accent); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
    .worksheet-mobile-content .field-head .worksheet-example-button { flex-shrink: 0; padding: 6px 2px; font-size: 12px; white-space: nowrap; }
    .worksheet-mobile-more-types, .worksheet-mobile-advanced { margin: 10px 0 0; padding: 12px 0; border: 0; border-top: 1px solid var(--ws-border); border-radius: 0; background: none; }
    .worksheet-mobile-flow summary { display: list-item; min-height: 44px; padding: 10px 4px; color: var(--ws-accent); font-size: 14px; }
    .worksheet-mobile-flow summary span { color: var(--ws-muted); font-size: 12px; }
    .worksheet-mobile-flow details[open] > summary { margin-bottom: 12px; }
    .worksheet-mobile-advanced .worksheet-editor-nav { position: static; }
    .worksheet-mobile-advanced .worksheet-tabs { grid-template-columns: 1fr 1fr; }
    .worksheet-mobile-advanced :is(#worksheetTab-content, #worksheetGoPreview) { display: none; }
    .worksheet-mobile-advanced .worksheet-print-actions { padding-inline: 0; }
    .worksheet-mobile-preview-slot .worksheet-preview-title { display: none; }
    .worksheet-mobile-preview-slot .worksheet-preview .worksheet-toolbar { padding: 0; border: 0; }
    .worksheet-mobile-preview-slot .worksheet-output-actions { justify-content: center; padding: 0 0 12px; }
    .worksheet-mobile-preview-slot .worksheet-output-actions #printWorksheet { flex: 0 1 auto; min-height: 44px; padding: 6px 12px; border: 0; background: none; font-weight: 400; text-decoration: underline; }
    .worksheet-mobile-preview-slot #worksheetViewport { height: min(124vw, 580px); }
    .worksheet-mobile-validation { margin: 0 12px 12px; padding: 12px; border: 1px solid #e3b5b0; border-radius: 6px; background: #fff2ef; color: #8b3024; font-size: 14px; line-height: 1.5; }
    .worksheet-mobile-actions { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--ws-border); background: #fff; }
    .worksheet-mobile-flow.is-visible .worksheet-mobile-actions { position: fixed; z-index: 20; left: 12px; right: 12px; bottom: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); border: 1px solid var(--ws-border); border-bottom: 0; }
    .worksheet-app .worksheet-mobile-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px; border: 1px solid var(--ws-accent); border-radius: 6px; background: #fff; color: var(--ws-accent); font-size: 14px; font-weight: 600; }
    .worksheet-mobile-actions #worksheetMobileBack { min-width: 64px; }
    .worksheet-mobile-actions #worksheetMobileNext, .worksheet-mobile-download-slot { flex: 1; min-width: 0; }
    .worksheet-app .worksheet-mobile-actions .primary { width: 100%; background: var(--ws-accent); color: #fff; }
    .worksheet-app .worksheet-mobile-actions .primary:hover:not(:disabled) { background: #124b60; color: #fff; }
    .worksheet-page .content-page { padding: 16px 12px 32px; gap: 14px; }
    body.worksheet-page .tool-hero h1 { font-size: 28px; }
    .worksheet-page .lede { font-size: 16px; line-height: 1.5; }
    .worksheet-page .site-header { position: sticky; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0; min-height: 60px; padding: 6px 16px; }
    .worksheet-page .site-nav a { display: flex; align-items: center; min-height: 44px; margin: 0; padding: 4px 8px; border-radius: 4px; }
    .worksheet-app .workspace { grid-template-columns: minmax(0, 1fr); }
    .worksheet-editor { padding: 12px; border-right: 0; border-bottom: 1px solid var(--ws-border); }
    .worksheet-template-picker { margin-bottom: 4px; }
    .worksheet-editor-nav { position: sticky; top: var(--worksheet-header-height, 64px); z-index: 3; display: flex; align-items: center; gap: 6px; margin: 0 -2px 8px; padding: 0 2px; background: #fff; border-bottom: 1px solid var(--ws-border); }
    .worksheet-tabs { flex: 1; min-width: 0; margin-bottom: 0; border-bottom: 0; }
    .worksheet-tabs button { font-size: 13px; padding-inline: 4px; }
    .worksheet-app .worksheet-preview-jump, .worksheet-app .worksheet-edit-jump { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 44px; padding: 8px; border: 1px solid var(--ws-accent); border-radius: 6px; background: #fff; color: var(--ws-accent); font-size: 12px; font-weight: 600; }
    .worksheet-preview-title { flex-wrap: wrap; gap: 8px; }
    .worksheet-preview-title h2 { margin-right: auto; }
    .worksheet-preview-title #worksheetMetadata { font-size: 11px; }
    .worksheet-app .worksheet-settings-hint { text-align: left; }
    .worksheet-app #sourceText, .worksheet-app #worksheetJoins { height: 104px; min-height: 104px; padding: 10px; }
    .worksheet-app .preset-row { gap: 0 8px; }
    .worksheet-app .preset-row button { font-size: 12px; }
    .worksheet-app .worksheet-print-actions { margin: 0; padding: 8px 12px; justify-content: space-between; }
    .worksheet-app .worksheet-toolbar { padding: 12px 16px; gap: 10px; }
    .worksheet-preview-title { width: 100%; justify-content: space-between; }
    .worksheet-output-actions { width: 100%; }
    .worksheet-app .worksheet-output-actions button { flex: 1; padding: 10px; font-size: 13px; }
    .worksheet-feedback { padding: 4px 16px; }
    #worksheetViewport { height: min(124vw, 650px); scrollbar-gutter: auto; }
    #worksheetPaperPreview { padding: 16px; }
    .worksheet-preview-footer { padding: 8px; gap: 8px; flex-wrap: wrap; justify-content: center; }
    .worksheet-pagination output { max-width: 180px; }
    .worksheet-zoom { gap: 4px; }
    .worksheet-zoom button { width: 44px; }
    .worksheet-field input[type="range"] { height: 44px; }
    .worksheet-reading-grid, .worksheet-page .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .worksheet-reading-grid > div + div { border-left: 0; padding-left: 0; }
    .worksheet-page .content-section h2 { font-size: 24px; }
    .worksheet-page .worksheet-related { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .worksheet-page .faq-grid { gap: 0; }
    .worksheet-table-wrap { box-shadow: var(--shadow-md, 3px 3px 0 #14142b); }
    .worksheet-spec-table, .worksheet-spec-table tbody, .worksheet-spec-table tr, .worksheet-spec-table td { display: block; width: 100%; }
    .worksheet-spec-table thead { display: none; }
    .worksheet-spec-table tbody tr { padding: 12px 14px; border-bottom: 2px dashed var(--line-soft, #d9dbe8); }
    .worksheet-spec-table tbody tr:last-child { border-bottom: 0; }
    .worksheet-spec-table td { padding: 3px 0; border-bottom: 0; }
    .worksheet-spec-table td:first-child { font-size: 16px; margin-bottom: 4px; }
    .worksheet-spec-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; color: var(--ink, #14142b); }
    .worksheet-template-cell { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
    .worksheet-template-action { min-height: 38px; flex-shrink: 0; }
    .worksheet-spec-table tbody tr[data-template-row].is-active td:first-child { box-shadow: none; }
    .worksheet-spec-table tbody tr[data-template-row].is-active { box-shadow: inset 4px 0 var(--accent, #1d3fd8); }
  }
  @media (prefers-reduced-motion: reduce) { .worksheet-app button { transition: none; } }
}
