﻿
body {
  --ezwk-theme:        var(--ezwk-formrecast);
  --ezwk-theme-deep:   var(--ezwk-formrecast-deep);
  --ezwk-theme-bright: var(--ezwk-formrecast-bright);
  --ezwk-theme-rgb:    var(--ezwk-formrecast-rgb);
}
.abstract-core {
  width: 176px;
  height: 214px;
  border-radius: 18px;
  background:
    linear-gradient(rgb(var(--ezwk-theme-rgb) / .14) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--ezwk-theme-rgb) / .14) 1px, transparent 1px),
    linear-gradient(180deg, var(--ezwk-surface), color-mix(in srgb, var(--ezwk-theme-soft) 60%, #fff));
  background-size: 100% 31px, 34px 100%, auto;
}
.abstract-core::before,
.abstract-core::after {
  content: "";
  position: absolute;
  border-radius: 10px;
  background: rgb(var(--ezwk-theme-rgb) / .18);
}
.abstract-core::before { left: 26px; top: 72px; width: 104px; height: 30px; }
.abstract-core::after { right: 28px; bottom: 42px; width: 84px; height: 26px; }
.abstract-piece { border-radius: 14px; }
.abstract-piece.piece-a,
.abstract-piece.piece-d { width: 86px; height: 44px; border-radius: 14px; }
.abstract-core { animation-name: form-build; }
.abstract-piece { animation-name: form-chip; }

.source-upload-surface {
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.source-upload-surface.awaiting-upload {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--ezwk-surface-soft);
  border: 1.5px dashed var(--ezwk-line);
  cursor: pointer;
}
.source-upload-surface.dragging {
  border-color: var(--ezwk-action);
  background: var(--ezwk-action-soft);
  box-shadow: inset 0 0 0 1px var(--ezwk-focus-ring);
}
.source-upload-surface.awaiting-upload:focus-visible {
  outline: 3px solid var(--ezwk-focus-ring);
  outline-offset: 2px;
}
.source-empty-state {
  width: min(100%, 340px);
  padding: 36px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  text-align: center;
}
.source-document-icon {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  color: var(--ezwk-app-ink);
  background: var(--ezwk-surface);
  border-radius: 50%;
  box-shadow: 0 3px 16px rgb(var(--c-ink) / .06);
}
.source-document-icon svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.source-empty-state strong { margin-top: 6px; color: var(--ezwk-app-ink); font-size: 18px; }
.source-empty-state p { margin: 0; color: var(--ezwk-app-muted); font-size: 13px; line-height: 1.5; }
.file-picker { margin-top: 9px; padding-inline: 30px; font-size: 14px; }
.subtle-button {
  color: var(--ezwk-app-ink); background: transparent; border: 0; font-size: 13px; font-weight: 700; padding: 8px 10px;
}
.subtle-button:hover { text-decoration: underline; }
.c-panel-head > .button { flex: none; }
.result-empty-state {
  width: 100%;
  min-height: 100%;
  max-width: 300px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px;
  color: var(--ezwk-app-muted);
  text-align: center;
}
.result-empty-state strong { color: var(--ezwk-app-ink); font-size: 18px; line-height: 1.65; }
.result-empty-state p { font-size: 13px; line-height: 1.8; }


.workspace {
  max-width: 1460px;
  margin: 0 auto;
  padding: 76px 0 48px;
}
.section-description { max-width: 420px; color: var(--ezwk-app-muted); font-size: 14px; }
.empty-workspace {
  min-height: 248px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px;
  color: var(--ezwk-app-muted); background: var(--ezwk-surface); border: 1px dashed var(--ezwk-line); border-radius: var(--ezwk-radius-md);
}
.empty-workspace strong { color: var(--ezwk-app-ink); font-size: 17px; font-weight: 600; }
#studio .studio-panel { border-radius: 15px; overflow: hidden; }
.source-asset-bar {
  padding: 9px 12px 10px;
  margin-bottom: 10px;
  background: var(--ezwk-line-soft);
  border: 1px solid var(--ezwk-app-line);
  border-radius: 9px;
}
.source-asset-bar strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ezwk-app-ink);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sheet-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.sheet-tab {
  max-width: 100%; padding: 5px 9px; color: var(--ezwk-app-muted); background: var(--ezwk-surface); border: 1px solid transparent;
  border-radius: 999px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sheet-tab.active { color: var(--ezwk-app-ink); background: var(--ezwk-success-soft); border-color: var(--ezwk-line); font-weight: 700; }
.compact-insights {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 10px;
  padding: 12px 13px;
  background: var(--ezwk-surface-soft);
  border: 1px solid var(--ezwk-app-line);
  border-radius: 10px;
}
.compact-score p,
.compact-points > p {
  margin: 0 0 7px;
  color: var(--ezwk-quiet);
  font-size: 10px;
  letter-spacing: .14em;
  font-weight: 800;
}
.badge {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  background: var(--ezwk-app-surface-soft);
  color: var(--ezwk-success);
}
.badge.warn { color: var(--ezwk-warning); background: var(--ezwk-page-background); }
.badge.risk { color: var(--ezwk-danger); background: var(--ezwk-danger-soft); }
.issue-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  list-style: none;
}
.issue-list li {
  display: flex;
  gap: 7px;
  color: var(--ezwk-app-muted);
  font-size: 11px;
  line-height: 1.5;
}
.issue-list li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--ezwk-success);
}
#studio .c-panel-head {
  min-height: 67px; padding: 12px 16px; justify-content: flex-start;
  border-bottom: 1px solid var(--ezwk-app-line);
}
.c-tab.active { color: var(--ezwk-app-ink); }
.comparison-grid {
  position: relative;
  min-height: 676px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.preview-pane {
  min-width: 0;
  min-height: clamp(560px, 52vw, 720px);
  padding: 17px;
  display: flex;
  flex-direction: column;
}
.source-pane .c-panel-head, .result-pane .c-panel-head { min-height: 40px; margin-bottom: 12px; }
.source-pane .c-panel-head span, .result-pane .c-panel-head span { color: var(--ezwk-quiet); font-size: 11px; }
.formrecast-flow-arrow {
  width: 40px;
  display: grid;
  align-items: start;
  justify-items: center;
  padding-top: clamp(150px, 15vw, 220px);
  border-inline: 0;
  background: transparent;
}
.formrecast-flow-arrow span {
  width: 0;
  height: 0;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 22px solid var(--ezwk-action);
  filter: drop-shadow(0 8px 14px rgb(var(--c-accent) / .24));
}
.sheet-preview {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto; padding: 14px;
  background: var(--ezwk-line-soft); border: 1px solid var(--ezwk-app-line); border-radius: 10px;
}
.grid-canvas { display: grid; min-width: max-content; border-left: 1px solid var(--ezwk-line); border-top: 1px solid var(--ezwk-line); background: var(--ezwk-surface); }
.grid-cell {
  min-height: 30px; padding: 4px 6px; overflow: hidden;
  color: var(--ezwk-muted); background: var(--ezwk-surface); border-right: 1px solid var(--ezwk-line); border-bottom: 1px solid var(--ezwk-line);
  font-size: 11px; white-space: nowrap; text-overflow: ellipsis;
}
.grid-cell.filled { background: var(--ezwk-surface); }
.grid-cell.label { font-weight: 700; background: var(--ezwk-line-soft); }
.grid-cell.heading { color: var(--ezwk-app-ink); font-size: 13px; font-weight: 700; background: var(--ezwk-success-soft); }
.grid-cell.checkbox { background: var(--ezwk-page-background); }
.grid-cell.merge { border-color: var(--ezwk-line); }
.result-preview {
  flex: 1;
  min-height: 0;
  overflow: auto; display: flex; justify-content: center; align-items: start;
  padding: 14px; background: var(--ezwk-line-soft); border: 1px solid var(--ezwk-app-line); border-radius: 10px;
}
.result-preview.result-waiting { display: none; }
.form-paper {
  --paper-width: 474px;
  width: var(--paper-width); min-height: 650px; padding: 31px 32px 28px;
  color: var(--ezwk-ink-soft); background: var(--ezwk-app-surface); border: 1px solid var(--ezwk-line); box-shadow: 0 9px 23px rgb(var(--c-ink) / .1);
}
.form-paper.landscape { --paper-width: 585px; min-height: 432px; }
.form-paper.a3 { --paper-width: 555px; min-height: 750px; }
.form-paper.a3.landscape { --paper-width: 675px; min-height: 485px; }
.paper-brand { color: var(--ezwk-muted); font-size: 9px; font-weight: 800; letter-spacing: .24em; }
.paper-header { padding-bottom: 18px; margin-bottom: 18px; display: flex; justify-content: space-between; gap: 18px; border-bottom: 2px solid var(--ezwk-app-ink); }
.paper-title { margin-top: 6px; font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.paper-meta { color: var(--ezwk-muted); font-size: 9px; text-align: right; white-space: nowrap; }
.form-section-title { margin: 18px 0 10px; color: var(--ezwk-app-ink); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.form-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px 12px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.wide { grid-column: 1 / -1; }
.form-field span { color: var(--ezwk-muted); font-size: 10px; font-weight: 700; }
.form-field .line { min-height: 29px; background: var(--ezwk-surface); border: 1px solid var(--ezwk-line); border-radius: 2px; }
.form-field.textarea .line { min-height: 54px; }
.option-row { display: flex; gap: 14px; align-items: center; min-height: 29px; padding: 0 7px; border: 1px solid var(--ezwk-line); font-size: 10px; }
.option-row i { display: inline-block; width: 9px; height: 9px; margin-right: 4px; border: 1px solid var(--ezwk-quiet); vertical-align: middle; }
.paper-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 10px; }
.paper-table th, .paper-table td { height: 25px; padding: 4px 6px; border: 1px solid var(--ezwk-line); }
.paper-table th { color: var(--ezwk-muted); background: var(--ezwk-line-soft); font-weight: 700; text-align: left; }
.paper-note { min-height: 47px; margin-top: 17px; padding: 8px 9px; border: 1px solid var(--ezwk-line); color: var(--ezwk-muted); font-size: 9.5px; }
.paper-footer { display: flex; justify-content: space-between; margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--ezwk-line); color: var(--ezwk-quiet); font-size: 9px; }
.preset-compact .form-fields { gap: 8px; }
.preset-compact .form-field .line { min-height: 24px; }
.preset-field .form-field .line { min-height: 38px; }
.preset-field .form-field span { font-size: 11px; }
.form-platform-preview {
  width: min(100%, 650px); padding: 25px; color: var(--ezwk-app-ink); background: var(--ezwk-surface);
  border: 1px solid var(--ezwk-app-line); border-radius: 13px;
}
.form-preview-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 13px; }
.platform-kicker { margin: 0 0 5px; color: var(--ezwk-gridshift-deep); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.platform-kicker.microsoft { color: var(--ezwk-accent-deep); }
.form-preview-head h4 { margin: 0; color: var(--ezwk-app-ink); }
.integration-badge { flex: none; padding: 5px 10px; border-radius: 16px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.integration-badge.planned { color: var(--ezwk-gridshift-deep); background: var(--ezwk-line-soft); }
.integration-badge.researching { color: var(--ezwk-muted); background: var(--ezwk-line-soft); }
.platform-lead { margin: 0 0 21px; color: var(--ezwk-app-muted); font-size: 13px; line-height: 1.8; }
.form-plan-section { padding: 15px 0; border-top: 1px solid var(--ezwk-app-line); }
.form-section-index { margin: 0 0 4px; color: var(--ezwk-quiet); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.form-plan-section h5 { margin: 0 0 11px; color: var(--ezwk-app-ink); }
.form-question-list { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; list-style: none; }
.form-question { display: flex; justify-content: space-between; align-items: start; gap: 15px; padding: 9px 11px; background: var(--ezwk-surface-soft); border-radius: 7px; font-size: 12px; }
.question-name { color: var(--ezwk-app-ink); font-weight: 700; line-height: 1.55; }
.question-name small { display: block; color: var(--ezwk-app-muted); font-size: 10px; font-weight: 500; }
.question-type { flex: none; color: var(--ezwk-success); font-size: 11px; font-weight: 700; text-align: right; }
.integration-callout { margin-top: 20px; padding: 15px; background: var(--ezwk-line-soft); border: 1px solid var(--ezwk-line); border-radius: 9px; }
.integration-callout.muted { background: var(--ezwk-surface-soft); border-color: var(--ezwk-line-strong); }
.integration-callout strong { display: block; margin-bottom: 6px; color: var(--ezwk-app-ink); font-size: 14px; }
.integration-callout p { margin: 0 0 13px; color: var(--ezwk-app-muted); font-size: 12px; line-height: 1.7; }


/* Direct transformation canvas editor */
.inline-editor-toolbar {
  padding: 13px 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ezwk-app-line);
}
.inline-editor-toolbar p { color: var(--ezwk-app-muted); font-size: 12px; line-height: 1.7; }
.inline-editor-toolbar strong { color: var(--ezwk-app-ink); }
.drag-guide {
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  color: var(--ezwk-app-ink); background: var(--ezwk-line-soft); border-radius: 999px; font-weight: 800;
}
.editor-history-actions { display: flex; gap: 7px; flex: none; }
.editor-history-actions .button { min-height: 34px; }
.design-canvas {
  width: min(100%, 620px); min-height: 550px; margin: 0 auto; padding: 22px 20px 30px;
  color: var(--ezwk-ink-soft); background: var(--ezwk-app-surface); border: 1px solid var(--ezwk-line);
  box-shadow: 0 8px 25px rgb(var(--c-ink) / .06);
}
.design-document-header {
  display: flex; justify-content: space-between; align-items: start; gap: 16px;
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid var(--ezwk-app-ink);
}
.design-brand { color: var(--ezwk-quiet); font-size: 9px; font-weight: 800; letter-spacing: .24em; }
.design-title-input {
  display: block; width: min(100%, 360px); margin-top: 6px; padding: 3px 1px;
  color: var(--ezwk-app-ink); background: transparent; border: 1px solid transparent;
  border-radius: 4px; font-size: 22px; font-weight: 700; letter-spacing: -.04em;
}
.design-title-input:hover, .design-title-input:focus { background: var(--ezwk-surface); border-color: var(--ezwk-line); outline: none; }
.design-meta { color: var(--ezwk-quiet); font-size: 10px; text-align: right; }
.section-drop-slot { height: 11px; margin: 1px 0; border-radius: 6px; transition: background .12s, height .12s; }
.section-drop-slot.drop-active { height: 27px; background: var(--ezwk-success-soft); border: 1px dashed var(--ezwk-quiet); }
.design-section {
  position: relative; margin-bottom: 12px; padding: 10px 10px 12px;
  border: 1px solid transparent; border-radius: 9px; transition: border-color .15s, background .15s;
}
.design-section:hover, .design-section.is-selected { border-color: var(--ezwk-line); background: var(--ezwk-surface); }
.design-section.is-dragging, .design-item.is-dragging { opacity: .44; }
.design-section-head {
  display: flex; align-items: center; gap: 5px; margin-bottom: 7px;
}
.drag-handle {
  width: 25px; height: 25px; display: inline-grid; place-items: center; flex: none;
  color: var(--ezwk-quiet); background: transparent; border: 1px solid transparent; border-radius: 999px;
  font-size: 15px; font-weight: 700; cursor: grab;
}
.drag-handle:hover { color: var(--ezwk-app-ink); border-color: var(--ezwk-line); background: var(--ezwk-line-soft); }
.drag-handle:active { cursor: grabbing; }
.section-title-input {
  flex: 1; min-width: 0; padding: 3px 5px; color: var(--ezwk-app-ink); background: transparent;
  border: 1px solid transparent; border-radius: 5px; font-size: 12px; font-weight: 800;
  letter-spacing: .12em;
}
.section-title-input:hover, .section-title-input:focus { border-color: var(--ezwk-line); background: var(--ezwk-surface); outline: none; }
.section-mini-control, .item-mini-control {
  width: 26px; height: 26px; display: inline-grid; place-items: center;
  color: var(--ezwk-quiet); background: transparent; border: 1px solid transparent; border-radius: 999px;
  font-size: 13px; font-weight: 700;
}
.section-mini-control:hover, .item-mini-control:hover { color: var(--ezwk-app-ink); background: var(--ezwk-line-soft); border-color: var(--ezwk-line); }
.section-mini-control.danger:hover, .item-mini-control.danger:hover { color: var(--ezwk-danger); background: var(--ezwk-danger-soft); border-color: var(--ezwk-line); }
.section-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 9px; }
.item-drop-slot { grid-column: 1 / -1; height: 6px; border-radius: 6px; transition: height .12s, background .12s; }
.item-drop-slot.drop-active { height: 22px; background: var(--ezwk-success-soft); border: 1px dashed var(--ezwk-quiet); }
.design-item { position: relative; margin-bottom: 8px; }
.design-field {
  min-width: 0; padding: 5px 6px 7px; border: 1px solid transparent; border-radius: 7px;
  background: transparent;
}
.design-field.full, .design-table { grid-column: 1 / -1; }
.design-field:hover, .design-field.is-selected, .design-table:hover, .design-table.is-selected {
  border-color: var(--ezwk-quiet); background: var(--ezwk-surface-soft);
}
.design-item-head { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.field-label-input, .table-title-input {
  flex: 1; min-width: 0; padding: 3px 4px; color: var(--ezwk-muted); background: transparent;
  border: 1px solid transparent; border-radius: 4px; font-size: 10px; font-weight: 700;
}
.table-title-input { color: var(--ezwk-app-ink); font-size: 12px; letter-spacing: .08em; }
.field-label-input:hover, .field-label-input:focus, .table-title-input:hover, .table-title-input:focus {
  border-color: var(--ezwk-line); background: var(--ezwk-surface); outline: none;
}
.required-mark { color: var(--ezwk-danger); font-size: 11px; font-weight: 700; }
.field-visual { min-height: 30px; background: var(--ezwk-surface); border: 1px solid var(--ezwk-line); border-radius: 3px; }
.design-field.textarea .field-visual { min-height: 55px; }
.design-field.choice .field-visual { display: flex; gap: 14px; align-items: center; padding: 0 8px; font-size: 10px; }
.design-field.choice .field-visual span::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 4px; border: 1px solid var(--ezwk-quiet); vertical-align: -1px; }
.field-inspector {
  grid-column: 1 / -1; margin: 3px 0 10px; padding: 10px;
  display: flex; flex-wrap: wrap; align-items: end; gap: 8px;
  background: var(--ezwk-line-soft); border: 1px solid var(--ezwk-line); border-radius: 8px;
}
.field-inspector label { display: flex; flex-direction: column; gap: 3px; color: var(--ezwk-muted); font-size: 10px; font-weight: 700; }
.field-inspector select {
  min-height: 30px; padding: 0 8px; border: 1px solid var(--ezwk-line); border-radius: 5px; background: var(--ezwk-surface); color: var(--ezwk-app-ink); font-size: 11px;
}
.field-inspector .check-inline { flex-direction: row; align-items: center; min-height: 30px; gap: 6px; }
.field-inspector .button { min-height: 30px; padding-inline: 10px; font-size: 10px; }
.design-table { padding: 6px; border: 1px solid transparent; border-radius: 7px; }
.table-frame { overflow-x: auto; }
.design-table table { width: 100%; border-collapse: collapse; font-size: 10px; }
.design-table th, .design-table td { height: 28px; padding: 3px; border: 1px solid var(--ezwk-line); }
.design-table th { position: relative; min-width: 62px; background: var(--ezwk-line-soft); }
.column-label-input {
  width: calc(100% - 70px); min-width: 45px; padding: 2px 3px; color: var(--ezwk-muted); background: transparent; border: 1px solid transparent; border-radius: 3px; font-size: 10px; font-weight: 700;
}
.column-label-input:hover, .column-label-input:focus { background: var(--ezwk-surface); border-color: var(--ezwk-line); outline: none; }
.column-controls {
  position: absolute; top: 3px; right: 3px; display: inline-flex; gap: 1px; opacity: 0; transition: opacity .12s;
}
.design-table th:hover .column-controls, .design-table.is-selected .column-controls { opacity: 1; }
.column-controls button {
  width: 18px; height: 18px; color: var(--ezwk-quiet); background: var(--ezwk-surface); border: 0; border-radius: 999px; font-size: 10px; font-weight: 700;
}
.column-controls button:hover:not(:disabled) { color: var(--ezwk-app-ink); background: var(--ezwk-success-soft); }
.column-controls button.danger:hover:not(:disabled) { color: var(--ezwk-danger); background: var(--ezwk-danger-soft); }
.column-controls button:disabled { opacity: .25; }
.row-action { width: 30px; text-align: center; border-color: transparent !important; background: transparent; }
.row-remove { width: 20px; height: 20px; color: var(--ezwk-quiet); background: var(--ezwk-surface); border: 1px solid var(--ezwk-line); border-radius: 999px; font-size: 11px; }
.row-remove:hover { color: var(--ezwk-danger); border-color: var(--ezwk-line); background: var(--ezwk-danger-soft); }
.table-inline-actions, .item-inline-actions, .canvas-inline-actions {
  display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 8px;
}
.inline-plus {
  min-height: 27px; padding: 0 10px; color: var(--ezwk-success); background: var(--ezwk-surface);
  border: 1px dashed var(--ezwk-quiet); border-radius: 999px; font-size: 10px; font-weight: 700;
}
.inline-plus:hover { background: var(--ezwk-line-soft); border-style: solid; }
.inline-plus.section-add { margin: 8px auto 0; min-height: 34px; padding: 0 17px; font-size: 12px; }
.design-footer { display: flex; justify-content: space-between; margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--ezwk-line); color: var(--ezwk-quiet); font-size: 9px; }
.drop-note { margin: 10px 0 0; color: var(--ezwk-quiet); font-size: 10px; text-align: center; }
@media (max-width: 760px) {
  .inline-editor-toolbar { flex-direction: column; align-items: stretch; }
  .section-items { grid-template-columns: 1fr; }
  .design-canvas { padding: 16px 12px 22px; }
  .field-inspector { align-items: stretch; flex-direction: column; }
}

.toast {
  position: fixed; right: 26px; bottom: 24px; z-index: 40; transform: translateY(18px); opacity: 0; pointer-events: none;
  padding: 12px 17px; color: var(--ezwk-surface); background: var(--ezwk-app-ink); border-radius: 10px; box-shadow: var(--ezwk-app-shadow); font-size: 13px;
  transition: opacity .2s, transform .2s;
}
.toast.visible { transform: translateY(0); opacity: 1; }

@media (max-width: 1180px) {
  .comparison-grid { min-height: auto; }
}
@media (max-width: 980px) {
  .comparison-header { flex-direction: column; align-items: stretch; }
  .comparison-grid { grid-template-columns: 1fr; }
  .preview-pane { min-height: auto; }
  .source-pane { border-bottom: 0; }
  .formrecast-flow-arrow {
    width: auto;
    min-height: 42px;
    padding-top: 0;
    place-items: center;
    border-inline: 0;
    border-block: 0;
  }
  .formrecast-flow-arrow span {
    border-top: 22px solid var(--ezwk-action);
    border-right: 16px solid transparent;
    border-left: 16px solid transparent;
    border-bottom: 0;
  }
  .sheet-preview,
  .result-preview { min-height: 390px; max-height: 390px; }
}
@media (max-width: 600px) {
  .c-tabs { overflow-x: auto; }
  .c-tab { white-space: nowrap; }
  .form-paper { padding: 25px 20px; }
  .form-preview-head, .form-question { flex-direction: column; }
  .question-type { text-align: left; }
}


.studio-heading { margin-bottom: 28px; }
@media (max-width: 1120px) {
  .hero-split { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hero-outputs { grid-template-columns: 1fr; }
  .hero-flow { flex-wrap: wrap; }
  .compact-insights { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .source-empty-state { padding: 30px 12px; }
}

@media print {
  @page { size: A4 portrait; margin: 0; }


  /* Print only the generated paper preview. Hidden site sections must not
     retain layout height, otherwise browsers produce trailing blank pages. */
  body.formrecast-print-ready .shell-header,
  body.formrecast-print-ready .shell-footer,
  body.formrecast-print-ready .site-header,
  body.formrecast-print-ready .site-footer,
  body.formrecast-print-ready #toast,
  body.formrecast-print-ready .product-hero,
  body.formrecast-print-ready #formrecastDownload,
  body.formrecast-print-ready #formrecastFaq {
    display: none !important;
  }

  body.formrecast-print-ready #studio {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  body.formrecast-print-ready #studio > :not(.studio-panel),
  body.formrecast-print-ready .studio-panel > :not(.comparison-grid),
  body.formrecast-print-ready .comparison-grid > :not(.result-pane),
  body.formrecast-print-ready .result-pane > :not(#resultPreview) {
    display: none !important;
  }

  body.formrecast-print-ready .studio-panel,
  body.formrecast-print-ready .comparison-grid,
  body.formrecast-print-ready .result-pane,
  body.formrecast-print-ready #resultPreview {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--ezwk-surface) !important;
    box-shadow: none !important;
  }

  body.formrecast-print-ready #resultPreview {
    position: static !important;
  }

  body.formrecast-print-ready .paper-page-stack {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  body.formrecast-print-ready .form-paper {
    display: block !important;
    box-sizing: border-box !important;
    width: 210mm !important;
    min-height: 297mm !important;
    padding: 14mm 15mm !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  body.formrecast-print-ready .form-paper.landscape {
    width: 297mm !important;
    min-height: 210mm !important;
  }

  body.formrecast-print-ready .form-paper.a3 {
    width: 297mm !important;
    min-height: 420mm !important;
  }

  body.formrecast-print-ready .form-paper.a3.landscape {
    width: 420mm !important;
    min-height: 297mm !important;
  }

  body.formrecast-print-ready .form-paper:not(:last-child) {
    break-after: page;
    page-break-after: always;
  }

  body.formrecast-print-ready .form-paper:last-child {
    break-after: auto;
    page-break-after: auto;
  }
}


/* Sample selection and multi-page document support */
.sample-options {
  width: 100%; margin-top: 10px; padding-top: 13px; display: grid; gap: 7px;
  border-top: 1px solid var(--ezwk-line);
}
.sample-options p { margin: 0 0 2px; color: var(--ezwk-quiet); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.sample-option {
  width: 100%; padding: 9px 11px; display: flex; flex-direction: column; align-items: start; gap: 2px;
  color: var(--ezwk-app-ink); background: var(--ezwk-surface); border: 1px solid var(--ezwk-line); border-radius: 18px; text-align: left;
}
.sample-option:hover { border-color: var(--ezwk-quiet); background: var(--ezwk-line-soft); }
.sample-option.featured { border-color: var(--ezwk-line); background: var(--ezwk-line-soft); }
.sample-option strong { font-size: 12px; }
.sample-option span { color: var(--ezwk-app-muted); font-size: 10px; }
.paper-page-stack {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.form-paper { flex: none; }
.paper-page-badge {
  margin-bottom: 12px; display: inline-flex; padding: 4px 9px; color: var(--ezwk-app-ink);
  background: var(--ezwk-line-soft); border-radius: 15px; font-size: 9px; font-weight: 800; letter-spacing: .14em;
}
.design-canvas { width: min(100%, 700px); }
.design-page {
  margin: 0 0 18px; padding: 13px 12px 17px; border: 1px solid var(--ezwk-line); border-radius: 8px;
  background: var(--ezwk-surface);
}
.design-page + .design-page { margin-top: 22px; }
.design-page-header {
  margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center;
  color: var(--ezwk-muted); font-size: 9px; font-weight: 800; letter-spacing: .16em;
}
.design-page-tag { padding: 3px 8px; color: var(--ezwk-app-ink); background: var(--ezwk-line-soft); border-radius: 13px; }
.page-break-control {
  min-height: 25px; padding: 0 8px; margin-left: 4px; color: var(--ezwk-muted); background: var(--ezwk-surface);
  border: 1px solid var(--ezwk-line); border-radius: 999px; font-size: 9px; font-weight: 700;
}
.page-break-control.active { color: var(--ezwk-success); border-color: var(--ezwk-line); background: var(--ezwk-line-soft); }
.page-break-rule {
  margin: 15px 0 13px; display: flex; align-items: center; gap: 10px;
  color: var(--ezwk-quiet); font-size: 9px; font-weight: 800; letter-spacing: .16em;
}
.page-break-rule::before, .page-break-rule::after { content: ""; flex: 1; border-top: 1px dashed var(--ezwk-line); }

@media (max-width: 760px) {
  .design-page { padding: 10px 8px 12px; }
}



/* FormRecast mapping view: source cells to redesigned elements */
.comparison-grid { position: relative; }
.preview-pane { position: relative; z-index: 1; }
.mapping-guide {
  flex: 1 1 100%;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid var(--ezwk-line);
  border-radius: 8px;
  color: var(--ezwk-app-ink);
  background: var(--ezwk-line-soft);
  font-size: 11px;
  line-height: 1.6;
}
.mapping-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.mapping-overlay path {
  fill: var(--ezwk-success);
  stroke: none;
}
.mapping-path {
  fill: none !important;
  stroke: var(--ezwk-success) !important;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-dasharray: 5 4;
  marker-end: url(#mappingArrow);
  filter: drop-shadow(0 2px 3px rgb(var(--c-muted) / .18));
}
.grid-cell.mapped-source {
  position: relative;
  cursor: pointer;
  transition: background-color .14s, box-shadow .14s, color .14s;
}
.grid-cell.mapped-source::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ezwk-action);
  opacity: .54;
}
.grid-cell.mapped-source:hover,
.grid-cell.mapped-source:focus-visible,
.grid-cell.map-active {
  color: var(--ezwk-app-ink);
  background: var(--ezwk-action-soft);
  box-shadow: inset 0 0 0 2px var(--ezwk-action);
  outline: none;
}
.design-item.map-target-active {
  position: relative;
  z-index: 6;
  border-color: var(--ezwk-action);
  background: var(--ezwk-action-soft);
  box-shadow: 0 0 0 2px var(--ezwk-focus-ring), 0 9px 20px rgb(var(--c-accent) / .1);
}
.design-item.map-target-active::before {
  content: "ﾚ行";
  position: absolute;
  top: -18px;
  left: 8px;
  padding: 2px 7px;
  border-radius: 9px;
  color: var(--ezwk-surface);
  background: var(--ezwk-action);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
}
@media (max-width: 980px) {
  .mapping-overlay { display: none !important; }
  .mapping-guide { order: 9; }
}
@media print {
  .mapping-overlay,
  .mapping-guide { display: none !important; }
}


/* FormRecast v24: EZ-WK rounded control language */
.sheet-tab,
.page-break-control,
.inline-plus { border-radius: var(--ezwk-button-radius, 999px); }
.sample-option { border-radius: 18px; }
.section-mini-control,
.item-mini-control,
.column-controls button,
.row-remove,
.drag-handle { border-radius: 50%; }
.shell-action { border-radius: var(--ezwk-button-radius, 999px); }


/* FormRecast v011: online form outputs */
.integration-badge.ready { color: var(--ezwk-gridshift-deep); background: var(--ezwk-line-soft); }
.integration-badge.import-ready { color: var(--ezwk-accent-deep); background: var(--ezwk-line-soft); }
.platform-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-result { margin-top: 16px; padding: 15px; border: 1px solid var(--ezwk-line); border-radius: 12px; background: var(--ezwk-line-soft); }
.platform-result.warning { border-color: var(--ezwk-line); background: var(--ezwk-page-background); }
.platform-result strong { display: block; margin-bottom: 6px; color: var(--ezwk-app-ink); font-size: 14px; }
.platform-result p, .platform-config-note { margin: 0 0 12px; color: var(--ezwk-app-muted); font-size: 12px; line-height: 1.7; }
.field-inspector { flex-wrap: wrap; }
.field-description-editor, .field-option-editor { flex: 1 1 100%; }
.field-description-editor input, .field-option-editor textarea { display: block; width: 100%; margin-top: 4px; padding: 7px 9px; color: var(--ezwk-app-ink); background: var(--ezwk-surface); border: 1px solid var(--ezwk-line); border-radius: 8px; font: inherit; }
.field-option-editor textarea { min-height: 56px; resize: vertical; }
.design-field.choice .field-visual { flex-wrap: wrap; }
.ms-import-document { width: min(100%, 700px); padding: 28px 31px; color: var(--ezwk-ink-soft); background: var(--ezwk-surface); border: 1px solid var(--ezwk-app-line); border-radius: 10px; }
.ms-import-document header { padding-bottom: 18px; margin-bottom: 22px; border-bottom: 2px solid var(--ezwk-app-ink); }
.ms-import-document header p { margin: 0 0 8px; color: var(--ezwk-muted); font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.ms-import-document header h4 { margin: 0 0 6px; color: var(--ezwk-app-ink); }
.ms-import-document header span { color: var(--ezwk-app-muted); font-size: 12px; }
.ms-import-section { margin: 24px 0; }
.ms-import-section h5 { margin: 0 0 13px; padding-bottom: 7px; color: var(--ezwk-app-ink); border-bottom: 1px solid var(--ezwk-line); }
.ms-import-question { margin: 0 0 17px; break-inside: avoid; }
.ms-import-question h6 { margin: 0 0 6px; color: var(--ezwk-ink-soft); }
.ms-import-help { margin: 0 0 7px; color: var(--ezwk-muted); font-size: 11px; }
.ms-import-answer { min-height: 31px; margin: 0; padding: 8px 10px; border: 1px solid var(--ezwk-line); color: var(--ezwk-quiet); font-size: 11px; }
.ms-import-answer.multi { min-height: 70px; }
.ms-import-options { margin: 0; padding: 0; display: grid; gap: 5px; list-style: none; color: var(--ezwk-ink-soft); font-size: 12px; }
.ms-import-document footer { margin-top: 27px; padding-top: 11px; border-top: 1px solid var(--ezwk-line); color: var(--ezwk-quiet); font-size: 10px; }
@media print {
  body.formrecast-ms-import-ready .shell-header,
  body.formrecast-ms-import-ready .shell-footer,
  body.formrecast-ms-import-ready .site-header,
  body.formrecast-ms-import-ready .site-footer,
  body.formrecast-ms-import-ready #toast,
  body.formrecast-ms-import-ready .product-hero,
  body.formrecast-ms-import-ready #formrecastDownload,
  body.formrecast-ms-import-ready #formrecastFaq { display: none !important; }
  body.formrecast-ms-import-ready #studio { max-width: none !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; }
  body.formrecast-ms-import-ready #studio > :not(.studio-panel),
  body.formrecast-ms-import-ready .studio-panel > :not(.comparison-grid),
  body.formrecast-ms-import-ready .comparison-grid > :not(.result-pane),
  body.formrecast-ms-import-ready .result-pane > :not(#resultPreview) { display: none !important; }
  body.formrecast-ms-import-ready .studio-panel, body.formrecast-ms-import-ready .comparison-grid, body.formrecast-ms-import-ready .result-pane, body.formrecast-ms-import-ready #resultPreview { display: block !important; width: auto !important; max-width: none !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; border: 0 !important; background: var(--ezwk-surface) !important; box-shadow: none !important; }
  body.formrecast-ms-import-ready .ms-import-document { width: auto !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; }
}


/* v032 FormRecast conversion report */
#conversionReportPanel {
  margin: 24px clamp(16px, 3vw, 30px) 0;
  border: 1px solid rgb(var(--c-muted) / .18);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgb(var(--c-muted) / .14), transparent 20rem),
    var(--ezwk-surface);
  box-shadow: 0 18px 54px rgb(var(--c-ink) / .06);
  padding: clamp(22px, 3vw, 34px);
}
#conversionReportPanel .c-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: start;
  margin-bottom: 22px;
}
#conversionReportPanel .c-panel-head p {
  max-width: 760px;
  margin-top: 10px;
  color: var(--ezwk-app-muted);
  line-height: 1.75;
}
.readiness-meter {
  min-width: 168px;
  min-height: 168px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 999px;
  color: var(--ezwk-surface);
  background: radial-gradient(circle at 35% 30%, var(--ezwk-quiet), var(--ezwk-success) 62%, var(--ezwk-app-ink));
  box-shadow: 0 22px 58px rgb(var(--c-muted) / .24);
}
.readiness-meter strong {
  display: block;
  font-size: 52px;
  line-height: 1.45;
  letter-spacing: -0.08em;
}
.readiness-meter span {
  display: block;
  max-width: 120px;
  margin: 7px auto 0;
  color: rgb(var(--c-surface) / .78);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}
.report-grid {
  display: grid;
  grid-template-columns: .9fr .9fr 1.2fr;
  gap: 14px;
}
.report-card {
  border: 1px solid var(--ezwk-app-line);
  border-radius: 22px;
  background: rgb(var(--c-surface) / .78);
  padding: 20px;
}
.report-card h4 {
  margin: 0 0 14px;
  color: var(--ezwk-app-ink);
}
.report-chip-list,
.report-output-list,
.report-check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.report-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.report-chip-list li {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ezwk-success);
  background: var(--ezwk-line-soft);
  font-size: 13px;
  font-weight: 800;
}
.report-output-list {
  display: grid;
  gap: 9px;
}
.report-output-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--ezwk-app-surface-soft);
  color: var(--ezwk-app-muted);
}
.report-output-list strong {
  color: var(--ezwk-app-ink);
}
.report-output-list .rating-high { color: var(--ezwk-success); }
.report-output-list .rating-medium { color: var(--ezwk-warning); }
.report-output-list .rating-low { color: var(--ezwk-danger); }
.report-check-list {
  display: grid;
  gap: 10px;
}
.report-check-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ezwk-app-muted);
  line-height: 1.6;
}
.report-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--ezwk-success);
}
.report-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
@media (max-width: 980px) {
  .report-header,
  .report-grid { grid-template-columns: 1fr; }
  .readiness-meter { width: 150px; min-width: 150px; min-height: 150px; }
}

/* Compact controls are exempt from the text line-height floor. */
:where(button, .button, [role="button"], [class*="chip"], [class*="tab"], [class*="badge"], [class*="pill"], [class*="tag"], [class*="close"], [class*="port"], .strip-card) {
  line-height: 1.15;
}

