:root {
    --paper: #f7f8f5;
    --ink: #1f2933;
    --muted: #6b7280;
    --line: #e4e8ec;
    --accent: #0f8b8d;
    --danger: #d94b3d;
    --shadow: 0 22px 70px rgba(31, 41, 51, 0.08);
    --board-scale: 1;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

button,
input,
select,
summary,
a {
    font: inherit;
}

.app-shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 0 rgba(31, 41, 51, 0.04);
    z-index: 10;
}

.brand {
    flex: 0 0 auto;
}

.brand h1,
.brand p {
    margin: 0;
}

.tool-strip {
    min-width: 0;
    gap: 6px !important;
    overflow-x: auto;
    scrollbar-width: thin;
}

.tool-group {
    flex: 0 0 auto;
    gap: 2px !important;
    padding: 3px !important;
    border-radius: 7px !important;
}

.tool-button {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #475569;
    cursor: pointer;
    text-decoration: none;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.tool-button svg {
    width: 16px;
    height: 16px;
}

.tool-button:hover {
    background: #f1f5f2;
    color: var(--ink);
}

.tool-button:active {
    transform: translateY(1px);
}

.tool-button.is-active {
    background: var(--ink);
    color: #fff;
}

.tool-button:disabled {
    cursor: not-allowed;
    opacity: 0.36;
}

.menu-dropdown {
    position: relative;
}

.menu-dropdown summary::-webkit-details-marker {
    display: none;
}

.menu-trigger {
    height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #475569;
    cursor: pointer;
    list-style: none;
    padding: 0 7px;
    user-select: none;
    transition: background 140ms ease, color 140ms ease;
}

.menu-trigger svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.menu-trigger span {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.menu-trigger:hover,
.menu-dropdown[open] .menu-trigger {
    background: #f1f5f2;
    color: var(--ink);
}

.chevron-icon {
    width: 12px !important;
    height: 12px !important;
    color: #718096;
}

.menu-panel {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    z-index: 10020;
    min-width: 172px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(31, 41, 51, 0.16);
}

.menu-item,
.menu-swatch,
.menu-color-custom {
    width: 100%;
    min-height: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    padding: 7px 9px;
    text-align: left;
    text-decoration: none;
}

.menu-item:hover,
.menu-swatch:hover,
.menu-color-custom:hover {
    background: #f5f7f4;
}

.menu-item svg,
.menu-swatch svg {
    width: 16px;
    height: 16px;
    color: #475569;
    flex: 0 0 auto;
}

.menu-item span,
.menu-swatch span,
.menu-color-custom span {
    font-size: 12px;
    font-weight: 650;
}

.menu-separator {
    height: 1px;
    margin: 5px 4px;
    background: var(--line);
}

.menu-item-danger {
    color: var(--danger);
}

.menu-item-danger svg {
    color: var(--danger);
}

.menu-item-danger:hover {
    background: rgba(217, 75, 61, 0.08);
}

.menu-item:disabled {
    cursor: wait;
    opacity: 0.62;
}

.menu-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    animation: menu-spinner-rotate 720ms linear infinite;
    flex: 0 0 auto;
}

.menu-item.is-loading > svg {
    display: none;
}

.menu-item.is-loading .menu-spinner {
    display: inline-block;
}

@keyframes menu-spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

.color-panel {
    min-width: 214px;
}

.color-swatches-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 6px 6px 4px;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    background: var(--swatch, #fff);
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: transform 100ms ease, box-shadow 100ms ease;
}

.color-swatch:hover {
    transform: scale(1.18);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
    z-index: 1;
}

.color-swatch.is-active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--accent);
}

.color-swatch-none {
    background:
        linear-gradient(135deg, transparent 43%, #d94b3d 44%, #d94b3d 56%, transparent 57%),
        #fff;
    border-color: #e5e7eb;
}

.color-saved-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 6px 2px;
    border-top: 1px solid var(--line);
    margin-top: 2px;
}

.color-saved-row:empty {
    display: none;
}

.menu-swatch.is-active {
    background: rgba(15, 139, 141, 0.1);
    color: var(--ink);
}

.color-dot,
.current-swatch {
    width: 16px;
    height: 16px;
    border: 1px solid #cfd6dc;
    border-radius: 999px;
    background: var(--swatch, #1f2933);
    flex: 0 0 auto;
}

.current-swatch {
    width: 14px;
    height: 14px;
}

.no-fill-dot,
.current-swatch.is-transparent {
    background:
        linear-gradient(135deg, transparent 43%, #d94b3d 44%, #d94b3d 56%, transparent 57%),
        #fff;
}

.menu-color-custom {
    justify-content: space-between;
}

.menu-color-custom input[type="color"] {
    width: 32px;
    height: 26px;
    border: 1px solid #cfd6dc;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    padding: 2px;
}

.select-control,
.slider-control {
    height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 6px;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.select-control svg,
.slider-control svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.menu-select {
    height: 24px;
    min-width: 48px;
    border: 1px solid #d7dde2;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 0 5px;
}

.menu-select:focus {
    border-color: var(--accent);
    outline: 2px solid rgba(15, 139, 141, 0.18);
    outline-offset: 0;
}

.slider-control input[type="range"] {
    width: 92px;
}

.control-value {
    min-width: 18px;
    color: #64748b;
    text-align: center;
}

.swatch,
.fill-swatch {
    width: 24px;
    height: 24px;
    border: 1px solid #d7dde2;
    border-radius: 999px;
    background: var(--swatch, transparent);
    cursor: pointer;
    display: inline-grid;
    place-items: center;
}

.swatch.is-active,
.fill-swatch.is-active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink);
}

.fill-swatch {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, transparent 44%, #d94b3d 45%, #d94b3d 55%, transparent 56%),
        #fff;
}

.separator {
    width: 1px;
    height: 20px;
    background: var(--line);
}

.width-control {
    flex: 0 0 auto;
    white-space: nowrap;
}

.font-control {
    flex: 0 0 auto;
    white-space: nowrap;
}

.number-input {
    width: 48px;
    height: 28px;
    border: 1px solid #d7dde2;
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.number-input:focus {
    border-color: var(--accent);
    outline: 2px solid rgba(15, 139, 141, 0.18);
    outline-offset: 0;
}

.zoom-value,
.page-count {
    min-width: 36px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    user-select: none;
}

.page-count {
    min-width: 24px;
}

.stage-shell {
    min-height: 0;
    flex: 1;
}

.stage {
    position: relative;
    height: 100%;
    overflow: auto;
    background:
        radial-gradient(circle at top left, rgba(15, 139, 141, 0.07), transparent 30%),
        var(--paper);
}

.board-frame {
    position: relative;
    width: calc(794px * var(--board-scale));
    height: calc(1123px * var(--board-scale));
    margin: 20px auto 28px;
}

.board-surface {
    position: relative;
    width: 794px;
    height: 1123px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    cursor: default;
    transform: scale(var(--board-scale));
    transform-origin: top left;
}

.board-surface[data-tool="text"] {
    cursor: text;
}

.board-surface[data-tool="rect"],
.board-surface[data-tool="ellipse"],
.board-surface[data-tool="line"] {
    cursor: crosshair;
}

.page-layer,
.guide-layer,
.snap-guide-layer,
.object-layer {
    position: absolute;
    inset: 0;
}

.page-layer {
    z-index: 0;
    pointer-events: none;
}

.page-sheet {
    position: absolute;
    left: 0;
    width: 794px;
    height: 1123px;
    border: 1px solid #e6eaef;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.guide-layer {
    z-index: 5;
    display: none;
    pointer-events: none;
}

.guide-layer.is-visible {
    display: block;
}

.guide-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1.5px dashed rgba(15, 139, 141, 0.72);
}

.guide-line-horizontal {
    top: auto;
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 0;
    border-top: 1.5px dashed rgba(15, 139, 141, 0.72);
    border-left: 0;
}

.guide-line[data-guide-kind="center"] {
    border-left-color: rgba(15, 139, 141, 0.42);
}

.guide-line.is-snapping {
    border-left-color: #ef6f5e;
    box-shadow: 0 0 0 3px rgba(239, 111, 94, 0.12);
}

.guide-line-horizontal.is-snapping {
    border-top-color: #ef6f5e;
}

.snap-guide-layer {
    z-index: 6;
    pointer-events: none;
}

.snap-guide-line {
    position: absolute;
    display: none;
    background: #ef6f5e;
    box-shadow: 0 0 0 3px rgba(239, 111, 94, 0.1);
}

.snap-guide-line.is-visible {
    display: block;
}

.snap-guide-line[data-axis="x"] {
    top: 0;
    bottom: 0;
    width: 2px;
}

.snap-guide-line[data-axis="y"] {
    left: 0;
    right: 0;
    height: 2px;
}

.object-layer {
    z-index: 2;
}

.wb-item {
    position: absolute;
    min-width: 10px;
    min-height: 10px;
    user-select: none;
    touch-action: none;
    cursor: grab;
}

.wb-item:focus {
    outline: none;
}

.wb-item.is-selected::after {
    content: "";
    position: absolute;
    inset: -6px;
    border: 1.5px solid var(--accent);
    border-radius: 6px;
    pointer-events: none;
}

.wb-item.is-moving {
    cursor: grabbing;
    z-index: 9999 !important;
}

.group-selection {
    position: absolute;
    z-index: 9998;
    border: 1.5px dashed var(--accent);
    border-radius: 7px;
    pointer-events: none;
}

.group-resize-handle {
    position: absolute;
    z-index: 10;
    width: 16px;
    height: 16px;
    border: 2px solid var(--accent);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(31, 41, 51, 0.16);
    pointer-events: auto;
    cursor: nwse-resize;
}

.group-resize-handle[data-handle="nw"] {
    top: -14px;
    left: -14px;
}

.group-resize-handle[data-handle="ne"] {
    top: -14px;
    right: -14px;
    cursor: nesw-resize;
}

.group-resize-handle[data-handle="se"] {
    right: -14px;
    bottom: -14px;
}

.group-resize-handle[data-handle="sw"] {
    left: -14px;
    bottom: -14px;
    cursor: nesw-resize;
}

.shape {
    width: 100%;
    height: 100%;
    border-style: solid;
    background: transparent;
    pointer-events: none;
}

.shape-rect {
    border-radius: 6px;
}

.shape-ellipse {
    border-radius: 999px;
}

.line-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.image-content {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: fill;
    pointer-events: none;
    user-select: none;
}

.text-content {
    width: 100%;
    height: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    overflow: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.18;
    font-weight: 300;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
    pointer-events: none;
}

.text-content b,
.text-content strong {
    font-weight: 700;
}

.text-content ul,
.text-content ol {
    margin: 0;
    padding-left: 1.4em;
    list-style-position: outside;
}

.text-content ul {
    list-style-type: disc;
}

.text-content ol {
    list-style-type: decimal;
}

.text-content[contenteditable="true"] {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 0 0 1px rgba(15, 139, 141, 0.32);
    cursor: text;
    pointer-events: auto;
    user-select: text;
}

.text-content[contenteditable="true"].is-empty::before {
    content: attr(data-placeholder);
    color: #a2aab3;
}

.resize-handle {
    position: absolute;
    z-index: 8;
    width: 14px;
    height: 14px;
    border: 2px solid var(--accent);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(31, 41, 51, 0.16);
    cursor: nwse-resize;
}

.resize-handle[data-handle="nw"] {
    top: -13px;
    left: -13px;
}

.resize-handle[data-handle="ne"] {
    top: -13px;
    right: -13px;
    cursor: nesw-resize;
}

.resize-handle[data-handle="se"] {
    right: -13px;
    bottom: -13px;
}

.resize-handle[data-handle="sw"] {
    left: -13px;
    bottom: -13px;
    cursor: nesw-resize;
}

.line-endpoint-handle {
    position: absolute;
    z-index: 10;
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(31, 41, 51, 0.18);
    cursor: crosshair;
    transform: translate(-50%, -50%);
}

.line-endpoint-handle::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 999px;
    background: var(--accent);
}

.snap-indicator {
    position: absolute;
    z-index: 10000;
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 4px rgba(15, 139, 141, 0.18);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.snap-indicator.is-visible {
    display: block;
}

.landing-shell,
.auth-shell {
    min-height: 100vh;
    background: var(--paper);
}

.landing-shell {
    overflow-x: hidden;
    background: #f7f9f6;
}

.landing-nav {
    width: min(1180px, calc(100% - 40px));
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(207, 214, 220, 0.72);
    background: transparent;
    padding: 13px 0;
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 720;
    text-decoration: none;
}

.landing-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: #17313a;
    color: #fff;
    font-size: 12px;
    font-weight: 760;
}

.landing-actions,
.landing-cta,
.documents-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-link,
.landing-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 680;
    text-decoration: none;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.landing-link {
    padding: 0 8px;
}

.landing-link:hover {
    color: #087779;
}

.landing-button {
    border: 1px solid #087779;
    background: #087779;
    color: #fff;
    padding: 0 16px;
}

.landing-button:hover {
    border-color: #065f61;
    background: #065f61;
    transform: translateY(-1px);
}

.landing-button-secondary {
    border-color: #cfd6dc;
    background: #fff;
    color: var(--ink);
}

.landing-button-secondary:hover {
    border-color: #aeb9c2;
    background: #fdfefe;
    color: #087779;
}

.landing-hero {
    width: min(1180px, calc(100% - 40px));
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(430px, 1.14fr);
    align-items: center;
    gap: 54px;
    margin: 0 auto;
    padding: 50px 0 32px;
}

.landing-copy h1,
.landing-copy p,
.landing-metrics,
.landing-metrics dt,
.landing-metrics dd,
.landing-preview-caption,
.landing-section-heading h2,
.landing-section-heading p,
.landing-feature h3,
.landing-feature p,
.landing-workflow h2,
.landing-workflow h3,
.landing-workflow p,
.auth-panel h1,
.auth-panel p {
    margin: 0;
}

.landing-kicker,
.feature-eyebrow {
    color: #087779;
    font-size: 12px;
    font-weight: 720;
    letter-spacing: 0;
    text-transform: uppercase;
}

.landing-copy h1 {
    max-width: 650px;
    margin-top: 12px;
    color: #17313a;
    font-size: clamp(42px, 6vw, 64px);
    font-weight: 720;
    line-height: 1.02;
    letter-spacing: 0;
}

.landing-lede {
    max-width: 620px;
    margin-top: 20px !important;
    color: #253943;
    font-size: 18px;
    line-height: 1.55;
    font-weight: 540;
}

.landing-support {
    max-width: 620px;
    margin-top: 14px !important;
    color: #5d6f78;
    font-size: 15px;
    font-weight: 460;
    line-height: 1.7;
}

.landing-cta {
    flex-wrap: wrap;
    margin-top: 26px;
}

.landing-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    max-width: 560px;
    margin-top: 28px !important;
    border: 1px solid #dfe6e2;
    border-radius: 8px;
    background: #dfe6e2;
    overflow: hidden;
}

.landing-metrics div {
    background: #fff;
    padding: 14px 16px;
}

.landing-metrics dt {
    color: #17313a;
    font-size: 24px;
    font-weight: 720;
    line-height: 1;
}

.landing-metrics dd {
    margin-top: 6px;
    color: #6a7980;
    font-size: 12px;
    font-weight: 560;
    line-height: 1.25;
}

.landing-preview-stack {
    min-width: 0;
}

.landing-preview {
    border: 1px solid #dce4df;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(23, 49, 58, 0.13);
    overflow: hidden;
}

.preview-toolbar {
    min-height: 48px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 88px;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid #dce4df;
    background: #fbfcfb;
    padding: 10px 14px;
}

.preview-window-dots,
.preview-tool-pills {
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-window-dots span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #cfd6dc;
}

.preview-window-dots span:nth-child(1) {
    background: #ef6f5e;
}

.preview-window-dots span:nth-child(2) {
    background: #e8b557;
}

.preview-window-dots span:nth-child(3) {
    background: #0f8b8d;
}

.preview-tool-pills span,
.preview-save-state {
    display: block;
    height: 24px;
    border: 1px solid #d7dde2;
    border-radius: 6px;
    background: #fff;
}

.preview-tool-pills span {
    width: 42px;
}

.preview-tool-pills .is-active {
    width: 32px;
    border-color: #17313a;
    background: #17313a;
}

.preview-save-state {
    width: 100%;
    background: #eef6f3;
}

.preview-workspace {
    display: grid;
    grid-template-columns: 38px 74px minmax(0, 1fr) 116px;
    gap: 14px;
    background: #eef3ef;
    padding: 16px;
}

.preview-tool-rail,
.preview-pages,
.preview-inspector {
    display: grid;
    align-content: start;
    gap: 10px;
}

.preview-tool-rail span,
.preview-pages span,
.preview-inspector span {
    display: block;
    border: 1px solid #d7dde2;
    border-radius: 7px;
    background: #fff;
}

.preview-tool-rail span {
    width: 34px;
    height: 34px;
}

.preview-tool-rail .is-active {
    border-color: #087779;
    background: #087779;
}

.preview-pages span {
    width: 68px;
    height: 88px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(23, 49, 58, 0.08);
}

.preview-pages .is-current {
    border-color: #087779;
    box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.12);
}

.preview-page {
    position: relative;
    height: 438px;
    border: 1px solid #e3e8eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(23, 49, 58, 0.1);
    overflow: hidden;
}

.preview-doc-title,
.preview-text,
.preview-image-block,
.preview-callout,
.preview-selection,
.preview-guide {
    position: absolute;
}

.preview-doc-title,
.preview-text,
.preview-image-block,
.preview-callout,
.preview-selection {
    border-radius: 6px;
}

.preview-guide {
    background: rgba(15, 139, 141, 0.2);
}

.preview-guide-vertical {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
}

.preview-guide-horizontal {
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
}

.preview-doc-title {
    left: 42px;
    top: 48px;
    width: 226px;
    height: 42px;
    background: #17313a;
}

.preview-text {
    left: 42px;
    top: 126px;
    width: 228px;
    height: 12px;
    background: #cfd8d2;
}

.preview-text-wide {
    top: 152px;
    width: 318px;
}

.preview-text-short {
    top: 340px;
    width: 252px;
}

.preview-image-block {
    right: 42px;
    top: 108px;
    width: 172px;
    height: 150px;
    border: 1px solid #bcd9d0;
    background:
        linear-gradient(135deg, rgba(15, 139, 141, 0.36) 0 46%, transparent 46%),
        linear-gradient(25deg, transparent 0 54%, rgba(239, 111, 94, 0.34) 54% 100%),
        #e7f2ef;
}

.preview-callout {
    left: 42px;
    bottom: 54px;
    width: 188px;
    height: 76px;
    border: 2px solid #087779;
    background: rgba(15, 139, 141, 0.08);
}

.preview-selection {
    right: 70px;
    bottom: 76px;
    width: 126px;
    height: 74px;
    border: 2px solid #ef6f5e;
    background: rgba(239, 111, 94, 0.08);
}

.preview-selection span {
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1px solid #ef6f5e;
    border-radius: 999px;
    background: #fff;
}

.preview-selection span:nth-child(1) {
    top: -5px;
    left: -5px;
}

.preview-selection span:nth-child(2) {
    top: -5px;
    right: -5px;
}

.preview-selection span:nth-child(3) {
    right: -5px;
    bottom: -5px;
}

.preview-selection span:nth-child(4) {
    bottom: -5px;
    left: -5px;
}

.preview-inspector {
    border-left: 1px solid #d8e0dc;
    padding-left: 12px;
}

.preview-inspector span {
    height: 48px;
}

.preview-inspector span:nth-child(2) {
    height: 80px;
}

.preview-inspector span:nth-child(4) {
    height: 32px;
    background: #17313a;
}

.landing-preview-caption {
    max-width: 560px;
    margin: 14px auto 0;
    color: #5d6f78;
    font-size: 13px;
    font-weight: 520;
    line-height: 1.5;
    text-align: center;
}

.landing-usecases {
    width: min(1180px, calc(100% - 40px));
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    margin: 4px auto 58px;
    border: 1px solid #dfe6e2;
    border-radius: 8px;
    background: #dfe6e2;
    overflow: hidden;
}

.landing-usecases span {
    min-height: 48px;
    display: grid;
    place-items: center;
    background: #fff;
    color: #334953;
    font-size: 13px;
    font-weight: 620;
}

.landing-showcase,
.landing-workflow,
.landing-footer {
    width: min(1180px, calc(100% - 40px));
    margin-right: auto;
    margin-left: auto;
}

.landing-showcase {
    padding: 4px 0 64px;
}

.landing-section-heading {
    max-width: 760px;
    margin-bottom: 24px;
}

.landing-section-heading h2,
.landing-workflow h2 {
    margin-top: 10px;
    color: #17313a;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0;
}

.landing-section-heading > p:last-child {
    max-width: 630px;
    margin-top: 12px;
    color: #5d6f78;
    font-size: 15px;
    font-weight: 460;
    line-height: 1.65;
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.landing-feature {
    position: relative;
    min-height: 226px;
    border: 1px solid #dfe6e2;
    border-radius: 8px;
    background: #fff;
    padding: 22px;
}

.landing-feature-large {
    grid-row: span 2;
    min-height: 466px;
    background: #f0f7f4;
}

.feature-visual {
    position: relative;
    height: 210px;
    margin-bottom: 24px;
    border: 1px solid #cfe0d9;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.feature-visual-canvas span {
    position: absolute;
    border-radius: 6px;
}

.feature-visual-canvas span:nth-child(1) {
    top: 34px;
    left: 28px;
    width: 188px;
    height: 30px;
    background: #17313a;
}

.feature-visual-canvas span:nth-child(2) {
    top: 88px;
    left: 28px;
    width: 240px;
    height: 12px;
    background: #cfd8d2;
}

.feature-visual-canvas span:nth-child(3) {
    right: 28px;
    bottom: 32px;
    width: 130px;
    height: 90px;
    background: #dceee9;
}

.feature-visual-canvas span:nth-child(4) {
    left: 28px;
    bottom: 34px;
    width: 136px;
    height: 58px;
    border: 2px solid #ef6f5e;
    background: rgba(239, 111, 94, 0.08);
}

.feature-number {
    position: absolute;
    top: 18px;
    right: 18px;
    color: #a9b5b1;
    font-size: 13px;
    font-weight: 720;
}

.landing-feature .feature-eyebrow {
    margin-bottom: 9px;
}

.landing-feature h3,
.landing-workflow h3 {
    color: #17313a;
    font-size: 18px;
    font-weight: 690;
    line-height: 1.25;
}

.landing-feature p:last-child,
.landing-workflow p {
    margin-top: 9px;
    color: #5d6f78;
    font-size: 14px;
    font-weight: 450;
    line-height: 1.58;
}

.landing-workflow {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 36px;
    align-items: start;
    border-top: 1px solid #dfe6e2;
    border-bottom: 1px solid #dfe6e2;
    padding: 40px 0;
}

.workflow-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.workflow-steps article {
    min-height: 204px;
    border: 1px solid #dfe6e2;
    border-radius: 8px;
    background: #fff;
    padding: 20px;
}

.workflow-steps span {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 999px;
    background: #17313a;
    color: #fff;
    font-size: 13px;
    font-weight: 720;
}

.landing-footer {
    padding: 24px 0 30px;
}

.landing-footer p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 520;
    line-height: 1.5;
}

.landing-footer a {
    color: #087779;
    font-weight: 700;
    text-decoration: none;
}

.landing-footer a:hover {
    text-decoration: underline;
}

.auth-shell {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-panel {
    width: min(420px, 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
    padding: 28px;
}

.auth-brand {
    margin-bottom: 24px;
}

.auth-panel h1 {
    font-size: 28px;
    letter-spacing: 0;
}

.auth-panel p {
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
}

.auth-error {
    margin-top: 16px;
    border: 1px solid rgba(217, 75, 61, 0.28);
    border-radius: 8px;
    background: rgba(217, 75, 61, 0.08);
    color: var(--danger);
    font-size: 13px;
    font-weight: 750;
    padding: 10px 12px;
}

.auth-form {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.auth-form label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.auth-form input {
    width: 100%;
    height: 42px;
    border: 1px solid #d7dde2;
    border-radius: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 650;
    padding: 0 12px;
}

.auth-form input:focus {
    border-color: var(--accent);
    outline: 2px solid rgba(15, 139, 141, 0.18);
}

.auth-form button {
    height: 42px;
    border: 1px solid var(--ink);
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 850;
}

.auth-switch {
    margin-top: 18px !important;
}

.auth-switch a {
    color: var(--accent);
    font-weight: 850;
}

.documents-shell {
    min-height: 100vh;
    background: var(--paper);
}

.documents-header {
    min-height: 72px;
    display: grid;
    grid-template-columns: 140px 1fr auto;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    padding: 14px 24px;
}

.documents-back,
.documents-primary,
.document-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.documents-back,
.documents-primary {
    min-height: 38px;
    padding: 0 12px;
}

.documents-back {
    justify-self: start;
}

.documents-primary {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.documents-primary:disabled {
    cursor: wait;
    opacity: 0.58;
}

.documents-back:hover,
.document-open:hover {
    background: #f5f7f4;
    border-color: #cfd6dc;
}

.documents-primary:hover {
    background: #111827;
}

.documents-back svg,
.documents-primary svg,
.document-open svg {
    width: 18px;
    height: 18px;
}

.documents-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.documents-brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    flex: 0 0 auto;
}

.documents-brand-mark svg {
    width: 21px;
    height: 21px;
}

.documents-brand h1,
.documents-brand p {
    margin: 0;
}

.documents-brand h1 {
    font-size: 18px;
    line-height: 1.2;
}

.documents-brand p {
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
}

.documents-list {
    width: min(1100px, calc(100% - 40px));
    margin: 24px auto;
    overflow-x: hidden;
}

.documents-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
}

.documents-table th:nth-child(1),
.documents-table td:nth-child(1) {
    width: 36%;
}

.documents-table th:nth-child(2),
.documents-table td:nth-child(2),
.documents-table th:nth-child(3),
.documents-table td:nth-child(3) {
    width: 14%;
}

.documents-table th:nth-child(4),
.documents-table td:nth-child(4),
.documents-table th:nth-child(5),
.documents-table td:nth-child(5) {
    width: 8%;
}

.documents-table th:nth-child(6),
.documents-table td:nth-child(6) {
    width: 20%;
}

.documents-table th,
.documents-table td {
    border-bottom: 1px solid var(--line);
    padding: 12px 12px;
    text-align: left;
    vertical-align: middle;
}

.documents-table th {
    background: #f8faf8;
    color: #475569;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.documents-table td {
    color: #475569;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
}

.documents-table tr:last-child td {
    border-bottom: 0;
}

.document-name {
    color: var(--ink);
    display: inline-block;
    max-width: 100%;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.document-name:hover {
    color: var(--accent);
}

.document-open {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
}

.document-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 5px;
    white-space: nowrap;
}

.document-danger {
    color: var(--danger);
}

.document-danger:hover {
    border-color: rgba(217, 75, 61, 0.36);
    background: rgba(217, 75, 61, 0.08);
}

.admin-list {
    display: grid;
    gap: 14px;
}

.admin-inline-form {
    margin: 0;
}

.documents-header-actions .admin-inline-form {
    display: flex;
}

.admin-switch {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    padding: 0 12px;
    transition: background 140ms ease, border-color 140ms ease;
}

.admin-switch:hover {
    background: #f5f7f4;
    border-color: #cfd6dc;
}

.admin-switch-track {
    width: 34px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #cfd6dc;
    padding: 2px;
    transition: background 140ms ease;
}

.admin-switch-thumb {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(31, 41, 51, 0.22);
    transform: translateX(0);
    transition: transform 140ms ease;
}

.admin-switch[aria-checked="true"] .admin-switch-track {
    background: var(--accent);
}

.admin-switch[aria-checked="true"] .admin-switch-thumb {
    transform: translateX(14px);
}

.admin-switch strong {
    color: #64748b;
    font-size: 12px;
}

.admin-message {
    margin-top: 0;
}

.admin-notice {
    border: 1px solid rgba(15, 139, 141, 0.25);
    border-radius: 8px;
    background: rgba(15, 139, 141, 0.08);
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    padding: 10px 12px;
}

.admin-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
    padding: 0 10px;
}

.admin-status.is-allowed {
    background: rgba(15, 139, 141, 0.1);
    color: #0a6d6f;
}

.admin-status.is-blocked {
    background: rgba(217, 75, 61, 0.1);
    color: var(--danger);
}

.admin-actions {
    align-items: stretch;
}

.documents-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    border: 1px dashed #cfd6dc;
    background: #fff;
    padding: 54px 24px;
    text-align: center;
}

.documents-empty svg {
    width: 34px;
    height: 34px;
    color: #64748b;
}

.documents-empty h2,
.documents-empty p {
    margin: 0;
}

.documents-empty h2 {
    font-size: 18px;
}

.documents-empty p {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

@media (min-width: 1120px) {
    .top-bar {
        align-items: flex-start;
    }

    .tool-strip {
        flex-wrap: wrap;
        overflow-x: visible;
        row-gap: 8px;
        scrollbar-width: none;
    }

    .tool-strip::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 1060px) {
    .landing-hero {
        grid-template-columns: 1fr;
        gap: 36px;
        padding-top: 40px;
    }

    .landing-preview-stack {
        max-width: 780px;
    }

    .landing-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .landing-feature-large {
        grid-column: span 2;
        grid-row: auto;
        min-height: auto;
    }

    .landing-workflow {
        grid-template-columns: 1fr;
    }
}

.stage::-webkit-scrollbar,
.tool-strip::-webkit-scrollbar,
.text-content::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.stage::-webkit-scrollbar-thumb,
.tool-strip::-webkit-scrollbar-thumb,
.text-content::-webkit-scrollbar-thumb {
    background: #cfd6dc;
    border-radius: 999px;
}

@media (max-width: 820px) {
    .top-bar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .brand {
        width: 100%;
    }

    .tool-strip {
        width: 100%;
    }

    .landing-nav {
        width: calc(100% - 28px);
        min-height: 64px;
        align-items: center;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .landing-cta,
    .documents-header-actions {
        width: 100%;
        align-items: stretch;
    }

    .landing-cta a,
    .documents-header-actions a,
    .documents-header-actions form,
    .documents-header-actions button {
        flex: 1;
    }

    .landing-actions {
        margin-left: auto;
    }

    .landing-actions a {
        min-height: 34px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .documents-header-actions form,
    .documents-header-actions form button {
        width: 100%;
    }

    .landing-hero {
        width: calc(100% - 28px);
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 0 20px;
    }

    .landing-copy h1 {
        font-size: 40px;
    }

    .landing-lede {
        font-size: 16px;
    }

    .landing-support {
        font-size: 14px;
    }

    .landing-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 22px !important;
    }

    .landing-metrics div {
        padding: 12px 10px;
    }

    .landing-metrics dt {
        font-size: 20px;
    }

    .landing-metrics dd {
        font-size: 11px;
    }

    .preview-toolbar {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
        padding: 9px 10px;
    }

    .preview-tool-pills {
        justify-content: flex-end;
    }

    .preview-tool-pills span {
        width: 30px;
    }

    .preview-tool-pills span:nth-child(n+4),
    .preview-save-state {
        display: none;
    }

    .preview-workspace {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .preview-tool-rail,
    .preview-pages,
    .preview-inspector {
        display: none;
    }

    .preview-page {
        height: 302px;
    }

    .preview-doc-title {
        left: 30px;
        top: 34px;
        width: 166px;
        height: 34px;
    }

    .preview-text {
        left: 30px;
        top: 94px;
        width: 168px;
    }

    .preview-text-wide {
        top: 118px;
        width: 216px;
    }

    .preview-text-short {
        top: 246px;
        width: 194px;
    }

    .preview-image-block {
        right: 28px;
        top: 100px;
        width: 120px;
        height: 120px;
    }

    .preview-callout {
        left: 30px;
        bottom: 38px;
        width: 138px;
        height: 62px;
    }

    .preview-selection {
        right: 38px;
        bottom: 48px;
        width: 92px;
        height: 58px;
    }

    .landing-preview-caption {
        text-align: left;
    }

    .landing-usecases,
    .landing-showcase,
    .landing-workflow,
    .landing-footer {
        width: calc(100% - 28px);
    }

    .landing-usecases {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 42px;
    }

    .landing-showcase {
        padding-bottom: 42px;
    }

    .landing-section-heading h2,
    .landing-workflow h2 {
        font-size: 29px;
    }

    .landing-feature-grid,
    .workflow-steps {
        grid-template-columns: 1fr;
    }

    .landing-feature-large {
        grid-column: auto;
    }

    .feature-visual {
        height: 170px;
    }

    .feature-visual-canvas span:nth-child(1) {
        left: 22px;
        width: 152px;
    }

    .feature-visual-canvas span:nth-child(2) {
        left: 22px;
        width: 178px;
    }

    .feature-visual-canvas span:nth-child(3) {
        right: 22px;
        width: 96px;
    }

    .feature-visual-canvas span:nth-child(4) {
        left: 22px;
        width: 112px;
    }

    .workflow-steps article {
        min-height: auto;
    }

    .board-surface {
        border-radius: 6px;
    }

    .page-sheet {
        border-radius: 6px;
    }

    .documents-header {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }

    .documents-back,
    .documents-primary {
        justify-self: stretch;
    }

    .documents-brand {
        order: -1;
    }

    .documents-list {
        width: calc(100% - 24px);
        margin: 16px auto;
    }

    .documents-table {
        min-width: 760px;
    }
}

@media (max-width: 420px) {
    .landing-copy h1 {
        font-size: 36px;
    }

    .preview-page {
        height: 282px;
    }

    .preview-doc-title {
        left: 24px;
        width: 142px;
    }

    .preview-text {
        left: 24px;
        width: 104px;
    }

    .preview-text-wide {
        width: 130px;
    }

    .preview-text-short {
        top: 232px;
        width: 134px;
    }

    .preview-image-block {
        right: 22px;
        width: 90px;
        height: 94px;
    }

    .preview-callout {
        left: 24px;
        bottom: 34px;
        width: 108px;
    }

    .preview-selection {
        right: 26px;
        bottom: 44px;
        width: 74px;
    }
}

/* Restored homepage styles from the EDITPAD-1 backup. */
.landing-shell {
    min-height: 100vh;
    overflow-x: visible;
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.landing-nav {
    width: auto;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    padding: 12px 24px;
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.landing-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.landing-actions,
.landing-cta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-link,
.landing-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: none;
}

.landing-link {
    padding: 0 8px;
}

.landing-link:hover,
.landing-link-strong {
    color: var(--accent);
}

.landing-button {
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
    padding: 0 14px;
}

.landing-button:hover {
    border-color: var(--ink);
    background: #111827;
    color: #fff;
    transform: none;
}

.landing-hero {
    width: min(1180px, calc(100% - 40px));
    min-height: calc(100vh - 210px);
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(390px, 1.05fr);
    align-items: center;
    gap: 48px;
    margin: 0 auto;
    padding: 62px 0 42px;
}

.landing-copy h1,
.landing-copy p,
.landing-proof,
.landing-details h2,
.landing-details p {
    margin: 0;
}

.landing-kicker {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.landing-copy h1 {
    max-width: none;
    margin-top: 10px;
    color: var(--ink);
    font-size: clamp(46px, 8vw, 86px);
    font-weight: 850;
    line-height: 0.95;
    letter-spacing: 0;
}

.landing-lede {
    max-width: 620px;
    margin-top: 18px !important;
    color: #334155;
    font-size: 18px;
    line-height: 1.55;
    font-weight: 450;
}

.landing-support {
    max-width: 610px;
    margin-top: 14px !important;
    color: #64748b;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.65;
}

.landing-cta {
    flex-wrap: nowrap;
    margin-top: 26px;
}

.landing-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px !important;
    padding: 0;
    list-style: none;
}

.landing-proof li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d7dde2;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    font-weight: 450;
    line-height: 1.2;
    padding: 8px 10px;
}

.landing-proof span {
    color: var(--ink);
    font-weight: 600;
}

.landing-preview {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.landing-preview-toolbar {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding: 12px;
    background: #f8faf8;
}

.landing-preview-toolbar > span {
    width: 42px;
    height: 24px;
    border: 1px solid #d7dde2;
    border-radius: 6px;
    background: #fff;
}

.landing-preview-toolbar > span:nth-child(1) {
    width: 28px;
    background: var(--ink);
}

.landing-preview-toolbar > span:nth-child(5) {
    flex: 1;
    min-width: 64px;
}

.landing-preview-workspace {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 96px;
    gap: 14px;
    background: #f4f7f6;
    padding: 16px;
}

.preview-rail,
.preview-panel {
    display: grid;
    align-content: start;
    gap: 10px;
}

.preview-rail span,
.preview-panel span {
    display: block;
    border: 1px solid #d7dde2;
    border-radius: 6px;
    background: #fff;
}

.preview-rail span {
    width: 34px;
    height: 34px;
}

.preview-rail span:nth-child(1) {
    background: var(--accent);
    border-color: var(--accent);
}

.preview-panel {
    border-left: 1px solid #e1e6ea;
    padding-left: 12px;
}

.preview-panel span {
    height: 54px;
}

.preview-panel span:nth-child(2) {
    height: 86px;
}

.landing-preview-page {
    position: relative;
    height: 430px;
    border: 1px solid #e6eaef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(31, 41, 51, 0.08);
    overflow: hidden;
}

.preview-title,
.preview-line,
.preview-image,
.preview-card,
.preview-selection,
.preview-guide {
    position: absolute;
}

.preview-title,
.preview-line,
.preview-image,
.preview-card,
.preview-selection {
    border-radius: 6px;
}

.preview-guide {
    background: rgba(15, 139, 141, 0.2);
}

.preview-guide-vertical {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
}

.preview-guide-horizontal {
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
}

.preview-title {
    left: 42px;
    top: 52px;
    width: 214px;
    height: 42px;
    background: var(--ink);
}

.preview-line {
    left: 42px;
    top: 128px;
    width: 230px;
    height: 12px;
    background: #d7dde2;
}

.preview-line-wide {
    top: 154px;
    width: 310px;
}

.preview-line-short {
    top: 334px;
    width: 260px;
}

.preview-image {
    right: 44px;
    top: 112px;
    width: 170px;
    height: 150px;
    background:
        linear-gradient(135deg, rgba(15, 139, 141, 0.34) 0 45%, transparent 45%),
        linear-gradient(25deg, transparent 0 52%, rgba(239, 111, 94, 0.35) 52% 100%),
        #edf6f4;
}

.preview-card {
    left: 42px;
    bottom: 54px;
    width: 180px;
    height: 74px;
    border: 2px solid var(--accent);
    background: rgba(15, 139, 141, 0.08);
}

.preview-selection {
    right: 72px;
    bottom: 76px;
    width: 124px;
    height: 74px;
    border: 2px solid #ef6f5e;
    background: rgba(239, 111, 94, 0.08);
}

/* ─── Hero preview: toolbar groups ─────────────────────────────────── */

.lpv-tg {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #fff;
    border: 1px solid #dde2e8;
    border-radius: 6px;
    padding: 3px;
}

.lpv-file,
.lpv-zoom {
    font-size: 10px;
    font-weight: 600;
    color: #374151;
    padding: 2px 5px;
    line-height: 1;
}

.lpv-tool {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #f1f5f8;
    flex-shrink: 0;
}

.lpv-tool-on {
    background: var(--ink);
}

.lpv-dot {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    background: var(--dc, #888);
    border: 1px solid rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.lpv-lbl {
    font-size: 9px;
    font-weight: 600;
    color: #64748b;
    padding: 0 2px;
    line-height: 1;
}

.lpv-num {
    font-size: 10px;
    font-weight: 700;
    color: #374151;
    padding: 2px 5px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    line-height: 1;
}

.lpv-vsep {
    width: 1px;
    height: 14px;
    background: #dde2e8;
    margin: 0 2px;
}

.lpv-spacer {
    flex: 1;
}

/* ─── Hero preview: right panel swatches ─────────────────────────── */

.lpv-panel-swatches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 4px;
    padding: 4px 0;
}

.lpv-panel-swatches span {
    display: block;
    height: 18px !important;
    border-radius: 4px !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    width: auto !important;
}

.lpv-panel-short {
    height: 30px !important;
}

/* ─── Hero preview: document page content (pvp) ─────────────────── */

.pvp-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 88px;
    background: linear-gradient(135deg, #0d9e9f 0%, #0a7a7b 100%);
    border-radius: 7px 7px 0 0;
}

.pvp-banner-title {
    position: absolute;
    top: 22px;
    left: 26px;
    width: 55%;
    height: 20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.88);
}

.pvp-banner-sub {
    position: absolute;
    top: 54px;
    left: 26px;
    width: 36%;
    height: 10px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.52);
}

.pvp-textcol {
    position: absolute;
    top: 106px;
    left: 26px;
    width: 46%;
}

.pvp-eyebrow {
    width: 52px;
    height: 7px;
    border-radius: 2px;
    background: rgba(13, 158, 159, 0.4);
    margin-bottom: 10px;
}

.pvp-line {
    height: 8px;
    border-radius: 2px;
    background: #cdd4db;
    margin-bottom: 7px;
}

.pvp-w100 { width: 100%; }
.pvp-w91  { width: 91%; }
.pvp-w82  { width: 82%; }
.pvp-w80  { width: 80%; }
.pvp-w62  { width: 62%; }
.pvp-w58  { width: 58%; }

.pvp-linegap {
    height: 10px;
}

.pvp-imgblock {
    position: absolute;
    top: 102px;
    right: 26px;
    width: 41%;
    height: 148px;
    border-radius: 7px;
    background:
        linear-gradient(145deg, rgba(13, 158, 159, 0.36) 0 42%, transparent 42%),
        linear-gradient(220deg, rgba(239, 111, 94, 0.32) 0 38%, transparent 38%),
        #eaf6f5;
    border: 1px solid rgba(13, 158, 159, 0.2);
}

.pvp-callout {
    position: absolute;
    top: 266px;
    left: 26px;
    right: 26px;
    height: 84px;
    border: 2px solid var(--accent);
    border-radius: 6px;
    background: rgba(13, 158, 159, 0.07);
    padding: 18px 18px 0;
}

.pvp-h {
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1.5px solid var(--accent);
    border-radius: 2px;
    background: #fff;
}

.pvp-h-nw { top: -5px;    left: -5px; }
.pvp-h-ne { top: -5px;    right: -5px; }
.pvp-h-se { bottom: -5px; right: -5px; }
.pvp-h-sw { bottom: -5px; left: -5px; }

.pvp-cline {
    height: 8px;
    border-radius: 2px;
    background: rgba(13, 158, 159, 0.28);
    margin-bottom: 8px;
}

.pvp-tagrow {
    position: absolute;
    bottom: 22px;
    left: 26px;
    display: flex;
    gap: 7px;
}

.pvp-tag {
    height: 20px;
    width: 54px;
    border-radius: 999px;
    background: #e8edf2;
    border: 1px solid #ced5db;
}

.pvp-tag-teal {
    background: rgba(13, 158, 159, 0.14);
    border-color: rgba(13, 158, 159, 0.32);
}

.pvp-tag-coral {
    background: rgba(239, 111, 94, 0.13);
    border-color: rgba(239, 111, 94, 0.30);
}

.landing-details {
    width: min(1180px, calc(100% - 40px));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 0 auto 42px;
    border: 1px solid var(--line);
    background: var(--line);
}

.landing-details div {
    background: #fff;
    padding: 22px;
}

.landing-details h2 {
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.landing-details p {
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

.landing-details .feature-eyebrow {
    margin-top: 0;
    color: var(--accent);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.landing-footer {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    border-top: 1px solid var(--line);
    padding: 20px 0 28px;
}

.landing-footer p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
}

.landing-footer a {
    color: var(--accent);
    font-weight: 850;
    text-decoration: none;
}

.landing-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 1060px) {
    .landing-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .landing-nav {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 16px;
    }

    .landing-actions,
    .landing-cta {
        width: 100%;
        align-items: stretch;
    }

    .landing-actions a,
    .landing-cta a {
        flex: 1;
    }

    .landing-hero {
        width: calc(100% - 28px);
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 38px 0 24px;
    }

    .landing-copy h1 {
        font-size: 52px;
    }

    .landing-lede {
        font-size: 16px;
    }

    .landing-support {
        font-size: 14px;
    }

    .landing-proof {
        flex-direction: column;
    }

    .landing-proof li {
        width: 100%;
    }

    .landing-preview-workspace {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .preview-rail,
    .preview-panel {
        display: none;
    }

    .landing-preview-page {
        height: 340px;
    }

    .preview-title {
        left: 30px;
        top: 42px;
        width: 166px;
        height: 34px;
    }

    .preview-line {
        left: 30px;
        top: 108px;
        width: 168px;
    }

    .preview-line-wide {
        top: 132px;
        width: 216px;
    }

    .preview-line-short {
        top: 282px;
        width: 194px;
    }

    .preview-image {
        right: 28px;
        top: 114px;
        width: 120px;
        height: 120px;
    }

    .preview-card {
        left: 30px;
        bottom: 46px;
        width: 138px;
        height: 62px;
    }

    .preview-selection {
        right: 38px;
        bottom: 58px;
        width: 92px;
        height: 58px;
    }

    .landing-details {
        width: calc(100% - 28px);
        grid-template-columns: 1fr;
    }
}

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

    html,
    body {
        height: auto;
        background: #fff;
    }

    body {
        overflow: visible !important;
    }

    .app-shell,
    .stage-shell,
    .stage {
        display: block;
        height: auto;
        min-height: 0;
        overflow: visible !important;
        background: #fff;
    }

    .top-bar,
    .page-layer,
    .guide-layer,
    .snap-guide-layer,
    .snap-indicator,
    .resize-handle,
    .line-endpoint-handle,
    .group-resize-handle,
    .group-selection {
        display: none !important;
    }

    .board-frame {
        width: 794px !important;
        height: auto !important;
        margin: 0 !important;
    }

    .board-surface {
        width: 794px !important;
        height: calc(1123px * var(--page-count)) !important;
        overflow: hidden;
        border: 0;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
        transform: none !important;
    }

    .wb-item {
        transform: translateY(calc(-1 * var(--page-gap-offset, 0px)));
    }

    .wb-item.is-selected::after {
        display: none;
    }
}
