/*
 * Notes & Canvas.
 *
 * The board itself is deliberately a light surface in both themes: sticky
 * notes are pale colours with dark text, and a dark board would make every
 * note glare. The chrome around it follows the theme normally.
 */

/* ================================================================ gallery */

.nc-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.nc-card {
    display: block;
    padding: 0;
    overflow: hidden;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-raised);
    font-family: inherit;
    cursor: pointer;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.nc-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 16px 32px rgba(15, 23, 42, .12);
}

.nc-card-preview {
    position: relative;
    height: 110px;
    border-bottom: 1px solid var(--border);
}

.nc-card-count {
    position: absolute;
    right: 10px;
    bottom: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    /* Opaque, not translucent: over a pale board the translucent version
       measured 1.05:1 against the preview behind it. */
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.nc-card-body { padding: 14px 16px 16px; display: grid; gap: 7px; }
.nc-card-body strong { color: var(--text-primary); font-size: 14.5px; overflow-wrap: anywhere; }

.nc-card-body p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12.5px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nc-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 11.5px;
}

.nc-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============================================================ board grounds
 * Fixed light values rather than theme tokens: the board is a sheet of paper,
 * and pale sticky notes on a dark ground are unreadable.
 */

.nc-bg-dots {
    background-color: #f8fafc;
    background-image: radial-gradient(#cbd5e1 1.1px, transparent 1.1px);
    background-size: 22px 22px;
}

.nc-bg-grid {
    background-color: #f8fafc;
    background-image:
        linear-gradient(#e2e8f0 1px, transparent 1px),
        linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
    background-size: 26px 26px;
}

.nc-bg-plain { background-color: #ffffff; }

/* ================================================================= editor */

.nc-shell { display: grid; gap: 14px; }

.nc-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-raised);
}

.nc-topbar-left,
.nc-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nc-title-wrap { display: grid; gap: 3px; min-width: 0; }

.nc-title-wrap input {
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 5px 9px;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    min-width: 180px;
}

.nc-title-wrap input:hover:not([readonly]) { border-color: var(--border); }
.nc-title-wrap input:focus { border-color: var(--accent); outline: none; background: var(--bg-sunken); }

.nc-meta { color: var(--text-secondary); font-size: 11.5px; padding-left: 9px; }

.nc-save-state {
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
    white-space: nowrap;
}

.nc-save-state.is-dirty { color: var(--warning); }

/* ---------------------------------------------------------------- toolbar */

.nc-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-raised);
}

.nc-tool {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--bg-sunken);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.nc-tool:hover { border-color: var(--accent); color: var(--accent); }
.nc-tool svg { width: 16px; height: 16px; flex-shrink: 0; }

/* -------------------------------------------------------------- workspace */

.nc-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 14px;
    align-items: start;
}

.nc-board-wrap {
    position: relative;
    height: 620px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.nc-board {
    position: relative;
    /* Larger than the viewport so there is room to spread out; the wrapper
       scrolls. */
    width: 1800px;
    height: 1200px;
}

/* ---------------------------------------------------------------- elements */

.nc-el {
    position: absolute;
    box-sizing: border-box;
    cursor: grab;
    /* The board is a light sheet regardless of theme, so element text defaults
       to dark rather than inheriting the page colour. */
    color: #0f172a;
}

.nc-el.is-dragging { cursor: grabbing; opacity: .88; }

.nc-el.is-selected {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nc-sticky {
    border-radius: 4px;
    padding: 12px 13px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .16);
}

.nc-text { width: 100%; height: 100%; overflow: auto; line-height: 1.45; }
.nc-text:focus { outline: none; }

.nc-shape { display: grid; place-items: center; }
.nc-shape svg { width: 100%; height: 100%; display: block; }

.nc-caption {
    position: absolute;
    inset: 8px;
    display: grid;
    place-items: center;
    line-height: 1.35;
    overflow: hidden;
}

.nc-caption:focus { outline: none; }

.nc-handle {
    position: absolute;
    right: -7px;
    bottom: -7px;
    width: 15px;
    height: 15px;
    border-radius: 4px;
    border: 2px solid #fff;
    background: var(--accent);
    cursor: nwse-resize;
    touch-action: none;
}

/* -------------------------------------------------------------- inspector */

.nc-inspector {
    position: sticky;
    top: calc(var(--header-height, 60px) + 12px);
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-raised);
    max-height: 620px;
    overflow-y: auto;
}

.nc-inspector-empty { display: grid; gap: 6px; }
.nc-inspector-empty strong { color: var(--text-primary); font-size: 13.5px; }
.nc-inspector-empty span { color: var(--text-secondary); font-size: 12.5px; line-height: 1.6; }

.nc-inspector-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.nc-inspector-head strong { color: var(--text-primary); font-size: 13.5px; }
.nc-inspector-actions { display: flex; gap: 6px; }

.nc-readonly { margin: 0; color: var(--text-secondary); font-size: 12.5px; }

.nc-field { display: grid; gap: 7px; }

.nc-field label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.nc-field label b { color: var(--text-primary); text-transform: none; letter-spacing: 0; }

.nc-field select {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-sunken);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
}

.nc-field input[type="range"] { width: 100%; accent-color: var(--accent); }

.nc-swatches { display: flex; flex-wrap: wrap; gap: 7px; }

.nc-swatch {
    width: 25px;
    height: 25px;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 7px;
    cursor: pointer;
}

.nc-swatch.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft, rgba(60,195,222,.3)); }

.nc-btn-row { display: flex; flex-wrap: wrap; gap: 6px; }

.nc-toggle {
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-sunken);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

.nc-toggle:hover { border-color: var(--accent); }
.nc-toggle.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* A resolved comment is still readable, just clearly done with. */
.it-note.is-resolved { opacity: .66; }

@media (max-width: 960px) {
    .nc-workspace { grid-template-columns: 1fr; }
    .nc-inspector { position: static; max-height: none; }
    .nc-board-wrap { height: 460px; }
}

/* ======================================================= grouped toolbar */

.nc-toolbar {
    align-items: flex-start;
    gap: 14px;
}

.nc-tool-group {
    display: grid;
    gap: 6px;
    padding-right: 14px;
    border-right: 1px solid var(--border);
}

.nc-tool-group:last-child { border-right: none; padding-right: 0; }

.nc-tool-group-label {
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.nc-tool-row { display: flex; flex-wrap: wrap; gap: 6px; }

.nc-tool-connect.is-on {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ===================================================== connect mode */

.nc-board.is-connecting .nc-el { cursor: crosshair; }

.nc-board.is-connecting .nc-el:hover {
    outline: 2px dashed var(--accent);
    outline-offset: 2px;
}

.nc-el.is-connect-source {
    outline: 3px solid var(--accent) !important;
    outline-offset: 2px;
}

/* The connector layer sits under the shapes so arrowheads tuck behind them. */
.nc-links {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.nc-links .nc-link-hit { pointer-events: stroke; }

/* ============================================================== charts */

.nc-chart {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}

.nc-chart-title {
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nc-chart-svg { flex: 1 1 auto; width: 100%; min-height: 0; }

/* =============================================================== tables */

.nc-table-wrap {
    overflow: auto;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}

.nc-table-el {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.nc-table-el th,
.nc-table-el td {
    border: 1px solid #cbd5e1;
    padding: 7px 9px;
    text-align: left;
    vertical-align: top;
    min-width: 54px;
}

.nc-table-el th { font-weight: 700; }
.nc-table-el th:focus,
.nc-table-el td:focus {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

/* ======================================================= inspector extras */

.nc-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-sunken);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
}

.nc-data-box {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    resize: vertical;
}

.nc-field label em {
    font-style: normal;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-secondary);
}

.nc-hint {
    margin: 0;
    color: var(--text-secondary);
    font-size: 11.5px;
    line-height: 1.6;
}

.nc-series-list { display: grid; gap: 9px; }

.nc-series-row {
    display: grid;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--bg-sunken);
}

.nc-series-label {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nc-swatch-sm { width: 20px; height: 20px; border-radius: 6px; }

@media (max-width: 960px) {
    .nc-tool-group { border-right: none; padding-right: 0; }
}

/* =============================================================== images */

.nc-image {
    overflow: hidden;
    background: transparent;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .1);
}

.nc-image img {
    width: 100%;
    height: 100%;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.nc-image-missing {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.nc-image-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 5px 8px;
    background: rgba(15, 23, 42, .68);
    color: #fff;
    font-size: 11.5px;
    text-align: center;
}

.nc-image-caption:focus { outline: none; }

/* A file dragged over the board gets an obvious landing zone. */
.nc-board.is-drop-target {
    outline: 3px dashed var(--accent);
    outline-offset: -6px;
    background: var(--accent-soft, rgba(60, 195, 222, .08));
}

/* ============================================================== mentions */

.nc-mention {
    display: inline-block;
    padding: 1px 6px;
    margin: 0 1px;
    border-radius: 5px;
    /* Fixed colours, not tokens: the board is a light sheet in both themes. */
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 700;
    /* The caret must be able to sit inside it, so it is not a separate
       editing context. */
    white-space: nowrap;
}

/* ======================================================== version history */

.nc-version-milestone td {
    background: var(--accent-soft, rgba(60, 195, 222, .1));
}

.nc-version-label {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
}

/* ==========================================================================
   Drawing and documents
   ========================================================================== */

/* The mode switch shows one toolbar and hides the other with the hidden
   attribute, which a display rule on the toolbar would otherwise override. */
.nc-toolbar[hidden], .nc-drawtools[hidden], .dc-bar[hidden], #dcFormatBar[hidden] { display:none !important; }

/* ------------------------------------------------------------ mode switch */
.nc-modebar { display:inline-flex; padding:3px; gap:2px; border-radius:12px;
    background: var(--bg-hover, rgba(15,23,42,.05)); align-self:flex-start; }
.nc-mode { border:0; background:transparent; padding:8px 18px; border-radius:9px; font:inherit;
    font-size:13px; font-weight:700; color: var(--text-secondary); cursor:pointer; }
.nc-mode.is-on { background: var(--bg-raised); color: var(--accent); box-shadow:0 1px 3px rgba(15,23,42,.14); }
.nc-mode:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }

/* ------------------------------------------------------------ draw layer */
.dr-layer { position:absolute; left:0; top:0; z-index:40; pointer-events:none; overflow:visible; }
.dr-layer.is-active { pointer-events:auto; cursor:crosshair; touch-action:none; }
.dr-layer.is-active.is-stylus-only { touch-action:pan-x pan-y; }
.dr-layer.is-active[data-tool="lasso"] { cursor:default; }
.dr-layer.is-active[data-tool="eraser"],
.dr-layer.is-active[data-tool="strokeEraser"] { cursor:none; }
.dr-eraser { fill:rgba(255,255,255,.55); stroke:#475569; stroke-width:1.2; stroke-dasharray:3 2; pointer-events:none; }
.dr-sel { fill:rgba(8,145,178,.06); stroke: var(--accent, #0891b2); stroke-width:1.4; stroke-dasharray:5 4; pointer-events:none; }
.dr-box { fill:rgba(8,145,178,.08); stroke: var(--accent, #0891b2); stroke-width:1; stroke-dasharray:4 3; pointer-events:none; }
/* While drawing, the board's own shapes must not steal the pen. */
.nc-board.is-drawing .nc-el { pointer-events:none; }

/* ------------------------------------------------------- draw toolbar */
.nc-drawtools { display:grid; gap:8px; }
.dt-bar { display:flex; flex-wrap:wrap; gap:12px 18px; align-items:flex-start;
    padding:12px 14px; border:1px solid var(--border); border-radius:14px; background: var(--bg-raised); }
.dt-group { display:grid; gap:6px; min-width:0; }
.dt-group[hidden] { display:none; }
.dt-group-label { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.07em; color: var(--text-secondary); }
.dt-row { display:flex; flex-wrap:wrap; gap:4px; align-items:center; }
.dt-tool { display:inline-grid; place-items:center; width:36px; height:36px; padding:0; border-radius:10px;
    border:1px solid transparent; background:transparent; color: var(--text-primary); cursor:pointer;
    transition: background .12s, border-color .12s, color .12s; }
.dt-tool svg { width:19px; height:19px; }
.dt-tool:hover { background: var(--bg-hover, rgba(15,23,42,.05)); }
.dt-tool.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.dt-tool:disabled { opacity:.35; cursor:default; background:transparent; }
.dt-tool:focus-visible, .dt-swatch:focus-visible, .dt-text-btn:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.dt-danger:not(:disabled):hover { color: var(--danger); }
.dt-text-btn { height:36px; padding:0 12px; border-radius:10px; border:1px solid var(--border);
    background:transparent; color: var(--text-secondary); font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.dt-text-btn:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.dt-text-btn:disabled { opacity:.4; cursor:default; }

.dt-swatches { display:grid; grid-template-columns:repeat(10, 22px); gap:5px; align-items:center; }
.dt-swatch { width:22px; height:22px; border-radius:50%; padding:0; cursor:pointer; background: var(--sw);
    border:1px solid rgba(15,23,42,.16); box-shadow: inset 0 0 0 2px var(--bg-raised); }
.dt-swatch.is-on { outline:2px solid var(--accent); outline-offset:1px; }
.dt-swatch-sm { width:18px; height:18px; }
.dt-swatch-none { background: linear-gradient(135deg, transparent 45%, #dc2626 45% 55%, transparent 55%), #fff; }
.dt-custom { grid-column: span 4; display:inline-flex; align-items:center; gap:6px; font-size:11.5px;
    font-weight:700; color: var(--text-secondary); cursor:pointer; }
.dt-custom input[type="color"] { width:26px; height:24px; min-height:0; padding:0; border:1px solid var(--border);
    border-radius:6px; background:none; cursor:pointer; }
.dt-recent { display:flex; align-items:center; gap:5px; font-size:10.5px; font-weight:700; color: var(--text-secondary); min-height:18px; }

.dt-settings { grid-template-columns:auto auto; column-gap:14px; align-items:start; }
.dt-settings > .dt-group-label { grid-column:1 / -1; }
.dt-sliders { display:grid; gap:7px; min-width:190px; }
.dt-slider { display:grid; gap:2px; font-size:11.5px; font-weight:700; color: var(--text-secondary); }
.dt-slider[hidden], .dt-check[hidden] { display:none; }
.dt-slider b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.dt-slider input[type="range"] { width:100%; min-height:0; accent-color: var(--accent); }
.dt-check { display:flex; align-items:center; gap:7px; font-size:12px; font-weight:600; color: var(--text-primary); cursor:pointer; }
.dt-check input { min-height:0; width:15px; height:15px; accent-color: var(--accent); }
.dt-preview { width:64px; height:64px; border-radius:12px; border:1px dashed var(--border);
    display:grid; place-items:center; background: repeating-conic-gradient(rgba(15,23,42,.05) 0 25%, transparent 0 50%) 0 0 / 12px 12px; }
.dt-preview span { border-radius:50%; display:block; }
.dt-preview span.is-eraser { border:1.5px dashed var(--text-secondary); background:transparent !important; opacity:1 !important; }
.dt-hint { margin:0; font-size:12.5px; color: var(--text-secondary); min-height:18px; }

/* ------------------------------------------------------------- documents */
.nc-card-doc { background: linear-gradient(var(--bg-raised), var(--bg-raised)) padding-box,
    repeating-linear-gradient(180deg, transparent 0 13px, rgba(15,23,42,.07) 13px 14px); }
.nc-card-kind { position:absolute; top:10px; left:10px; font-size:10px; font-weight:800; text-transform:uppercase;
    letter-spacing:.07em; padding:3px 8px; border-radius:6px; background: var(--bg-raised); color: var(--accent);
    border:1px solid var(--border); }
.nc-card-preview { position:relative; }

.dc-bar { display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding:8px 10px;
    border:1px solid var(--border); border-radius:14px; background: var(--bg-raised); position:sticky; top:calc(var(--header-height, 60px) + 6px); z-index:30; }
.dc-bar[hidden] { display:none; }
.dc-grp { display:flex; align-items:center; gap:2px; padding-right:8px; margin-right:2px; border-right:1px solid var(--border-soft, #eef2f7); }
.dc-grp:last-child { border-right:0; }
.dc-btn { display:inline-grid; place-items:center; width:32px; height:32px; padding:0; border:0; border-radius:8px;
    background:transparent; color: var(--text-primary); cursor:pointer; }
.dc-btn svg { width:17px; height:17px; }
.dc-btn:hover { background: var(--bg-hover, rgba(15,23,42,.05)); }
.dc-btn.is-on { background: var(--accent-soft); color: var(--accent); }
.dc-bar select { min-height:32px; height:32px; padding:0 8px; font-size:12.5px; border-radius:8px; max-width:150px; }
.dc-colour-btn { position:relative; }
.dc-a { font-weight:800; font-size:15px; line-height:1; font-family: Georgia, serif; }
.dc-a-mark { font-family:inherit; font-size:12px; }
.dc-under { position:absolute; left:7px; right:7px; bottom:5px; height:3px; border-radius:2px; background:#dc2626; }
#dcMarkSwatch { background:#fef08a; }
.dc-pop { position:relative; }
.dc-popover { position:absolute; top:38px; left:0; z-index:50; display:grid; grid-template-columns:repeat(5, 22px); gap:6px;
    padding:10px; border-radius:12px; background: var(--bg-raised); border:1px solid var(--border);
    box-shadow:0 12px 30px rgba(15,23,42,.14); }
.dc-popover[hidden] { display:none; }
.dc-custom { grid-column:1 / -1; display:flex; align-items:center; gap:6px; font-size:11.5px; font-weight:700; color: var(--text-secondary); cursor:pointer; }
.dc-custom input { width:26px; height:22px; min-height:0; padding:0; border:1px solid var(--border); border-radius:6px; }

/* The page itself: white paper on a grey desk, in both themes, because it is
   a document that will be printed and read as paper. */
.dc-desk { padding:28px 16px 40px; border-radius:16px; background:#e9edf2; overflow-x:auto; }
.dc-page { position:relative; width:794px; max-width:100%; min-height:1123px; margin:0 auto; background:#fff;
    box-shadow:0 1px 3px rgba(15,23,42,.12), 0 12px 32px rgba(15,23,42,.08); border-radius:3px; color:#1f2937; }
.dc-content { min-height:1123px; padding:72px 76px; outline:none; font-size:14.5px; line-height:1.7;
    color:#1f2937; overflow-wrap:anywhere; caret-color:#0891b2; }
.dc-page.is-drawing .dc-content { user-select:none; }
.dc-content:empty::before { content:"Start typing, or switch to Draw to sketch on the page."; color:#9ca3af; }
.dc-content h1 { font-size:28px; line-height:1.25; margin:0 0 14px; color:#111827; }
.dc-content h2 { font-size:21px; line-height:1.3; margin:22px 0 10px; color:#111827; }
.dc-content h3 { font-size:17px; line-height:1.35; margin:18px 0 8px; color:#111827; }
/* The app's own paragraph size must not reach inside the page: text on the
   page is sized by the document, so a paragraph matches the list below it. */
.dc-page .dc-content p, .dc-page .dc-content li, .dc-page .dc-content td,
.dc-page .dc-content th { font-size:inherit; line-height:inherit; color:inherit; }
.dc-content p { margin:0 0 10px; }
.dc-content blockquote { margin:12px 0; padding:6px 16px; border-left:4px solid #0891b2; color:#374151; background:#f8fafc; }
.dc-content pre { margin:12px 0; padding:12px 14px; border-radius:8px; background:#0f172a; color:#e2e8f0;
    font-family:"Courier New", monospace; font-size:13px; white-space:pre-wrap; }
.dc-content a { color:#0369a1; text-decoration:underline; }
.dc-content img { max-width:100%; height:auto; border-radius:6px; margin:6px 0; }
.dc-content hr { border:0; border-top:1px solid #d1d5db; margin:18px 0; }
.dc-content ul, .dc-content ol { margin:0 0 10px; padding-left:26px; }
.dc-content ul.dc-check { list-style:none; padding-left:4px; }
.dc-content ul.dc-check > li { position:relative; padding-left:28px; cursor:default; }
.dc-content ul.dc-check > li::before { content:""; position:absolute; left:2px; top:5px; width:15px; height:15px;
    border:1.6px solid #6b7280; border-radius:4px; background:#fff; cursor:pointer; }
.dc-content ul.dc-check > li[data-checked="true"] { color:#6b7280; text-decoration:line-through; }
.dc-content ul.dc-check > li[data-checked="true"]::before { background:#0891b2; border-color:#0891b2;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.dc-content table { border-collapse:collapse; width:100%; margin:12px 0; }
.dc-content th, .dc-content td { border:1px solid #d1d5db; padding:7px 10px; min-width:40px; vertical-align:top; }
.dc-content th { background:#f3f4f6; font-weight:700; }
.dc-status { display:flex; justify-content:flex-end; font-size:12px; color: var(--text-secondary); padding:0 4px; }

@media (max-width: 760px) {
    .dt-swatches { grid-template-columns:repeat(8, 22px); }
    .dt-settings { grid-template-columns:1fr; }
    .dc-desk { padding:12px 0 24px; background:transparent; }
    .dc-content { padding:34px 22px; }
    .dc-bar { top:calc(var(--header-height, 60px) + 2px); }
}

@media print {
    body * { visibility:hidden; }
    .dc-page, .dc-page * { visibility:visible; }
    .dc-page { position:absolute; left:0; top:0; box-shadow:none; width:100%; }
}
