/* =============================================================
   write-desktop.css: /reports/write, DESKTOP FIRST.
   Charming writes on his desktop (10/11), so these screens are the
   main spec. write.css holds the shared parts and the phone screens,
   which stay as the "still usable on a phone" reference. Pixel.
   ============================================================= */
.part-head { margin: 8px 0 28px; padding-top: 36px; border-top: 1.5px solid var(--ink); }
.part-head h2 { font-family: 'Fraunces', serif; font-weight: 900; font-size: clamp(30px, 3.4vw, 44px); line-height: 1; }
.part-head p { font-size: 16px; color: var(--ink-2); margin: 10px 0 0; max-width: 72ch; }
.desk-shot { margin-bottom: 64px; }
.desk-frame { position: relative; }

/* app header */
.d-apphead { display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 24px; border-bottom: 1.5px solid var(--ink); background: var(--paper); }
.d-apphead .brand { display: flex; align-items: center; gap: 10px; font-family: 'Fraunces', serif; font-weight: 900; font-size: 19px; }
.d-apphead .brand img { width: 34px; height: 34px; border-radius: 50%; }
.d-apphead .tag { font-family: 'Kalam', cursive; font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); border: 1.5px solid var(--rule); border-radius: 999px; padding: 2px 10px; }
.d-apphead .grow { flex: 1; }
.d-apphead .lnk { font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--coral); text-underline-offset: 3px; }
.d-apphead .me { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--ink); }

/* sign in */
.d-signin { display: grid; grid-template-columns: 1.1fr 1fr; height: 700px; }
.d-signin .left { position: relative; overflow: hidden; background: var(--paper-2); border-right: 1.5px solid var(--ink); padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; isolation: isolate; }
.d-signin .left .shape { position: absolute; border-radius: 50%; z-index: -1; }
.d-signin .left img { width: 72px; height: 72px; border-radius: 50%; border: 1.5px solid var(--ink); }
.d-signin .left h2 { font-family: 'Fraunces', serif; font-weight: 900; font-size: 84px; line-height: .92; letter-spacing: -.025em; margin: 26px 0 14px; }
.d-signin .left p { font-size: 19px; color: var(--ink-2); margin: 0; max-width: 30ch; }
.d-signin .right { display: grid; place-items: center; padding: 40px; }
.d-card { width: 400px; border: 1.8px solid var(--ink); border-radius: 22px; padding: 30px 28px 24px; background: var(--paper); box-shadow: var(--shadow-paper-lg); }
.d-card h3 { font-family: 'Fraunces', serif; font-weight: 900; font-size: 28px; margin-bottom: 18px; }
.d-card .w-btn { width: 100%; }
.d-card .w-lock { margin-top: 18px; }

/* article list */
.d-listwrap { padding: 32px 40px 48px; min-height: 520px; position: relative; }
.d-listhead { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.d-listhead h2 { font-family: 'Fraunces', serif; font-weight: 900; font-size: 40px; line-height: 1; flex: 1; }
.d-listhead .w-btn { flex: 0 0 auto; padding: 0 24px; }
.d-filter { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.d-filter .w-tabs { margin: 0; width: 380px; }
.d-search { flex: 0 0 300px; margin-left: auto; display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--ink); border-radius: 999px; padding: 0 14px; height: 44px; background: #fff; color: var(--ink-4); font-size: 14.5px; }
.d-search svg { width: 16px; height: 16px; color: var(--ink-3); flex-shrink: 0; }
.d-table { border: 1.8px solid var(--ink); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow-paper); }
.d-tr { display: grid; grid-template-columns: 96px 1fr 140px 200px 110px 56px; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--rule-soft); position: relative; }
.d-tr.th { border-top: 0; padding: 12px 18px; background: var(--paper-2); border-radius: 16px 16px 0 0; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.d-tr .thumb { width: 96px; height: 54px; border-radius: 10px; border: 1.5px solid var(--ink); overflow: hidden; background: var(--paper-2); }
.d-tr .thumb.empty { border-style: dashed; }
.d-tr .thumb img { width: 100%; height: 100%; object-fit: cover; }
.d-tr h3 { font-family: 'Fraunces', serif; font-weight: 900; font-size: 19px; line-height: 1.15; }
.d-tr h3.untitled { color: var(--ink-3); font-weight: 700; }
.d-tr .sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.d-tr .meta { font-size: 14px; color: var(--ink-2); }
.d-tr .w-status { justify-self: start; }
.d-tr .w-menu { right: 14px; top: 64px; }

/* modal over the app */
.d-scrim { position: absolute; inset: 40px 0 0 0; background: rgba(28,25,28,.42); z-index: 8; }
.d-modal { position: absolute; z-index: 9; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 480px; background: var(--paper); border: 2px solid var(--ink); border-radius: 24px; padding: 28px 28px 24px; box-shadow: 6px 8px 0 rgba(28,25,28,.25); }
.d-modal.wide { width: 580px; }
.d-modal h3 { font-family: 'Fraunces', serif; font-weight: 900; font-size: 30px; line-height: 1.05; }
.d-modal > p { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); margin: 10px 0 18px; }
.d-modal .btns { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.d-modal .btns .w-btn { flex: 0 0 auto; padding: 0 24px; }
.d-modal .btns .aside { margin-right: auto; font-size: 13.5px; color: var(--ink-3); }

/* editor: toolbar, canvas with real blocks, side panel */
.d-app { display: grid; grid-template-columns: 1fr 360px; min-height: 760px; }
.d-top { grid-column: 1 / -1; }
.d-canvas { padding: 0 0 56px; border-right: 1.5px solid var(--ink); position: relative; min-width: 0; }
.d-tools { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 24px; margin-bottom: 34px; border-bottom: 1.5px solid var(--rule); background: var(--paper); }
.d-tools span { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 11px; border: 1.5px solid var(--rule); border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.d-tools span b { font-family: 'Fraunces', serif; font-weight: 900; }
.d-tools .fmt { border-color: var(--ink); min-width: 34px; justify-content: center; font-weight: 700; }
.d-tools .fmt.on { background: var(--ink); color: var(--paper); }
.d-tools .fmt.off { opacity: .4; }
.d-tools .sep { width: 1.5px; height: 24px; padding: 0; min-height: 0; border: 0; border-radius: 0; background: var(--rule); margin: 0 4px; }
.d-tools .lbl { border: 0; padding: 0 2px; min-height: 0; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.d-col { max-width: 700px; margin: 0 auto; padding: 0 12px; }
.d-col .w-title-in { font-size: 50px; }
.d-col .w-sub-in { font-size: 20px; }
.d-col .r-body { display: block; padding: 0; font-size: 17px; counter-reset: none; }
.d-col .r-body > h2 { margin: 30px 0 12px; font-size: 34px; }
.d-col .r-body > h2::before { content: attr(data-n); }
.d-col .r-body > p:first-child { font-size: 17px; color: var(--ink-2); }
.d-col .r-stat { grid-template-columns: 9.5rem 1fr; }
.d-blk { position: relative; border-radius: 10px; outline: 1.5px dashed transparent; outline-offset: 8px; margin: 6px 0; }
.d-blk.hov { outline-color: var(--ink-4); }
.d-blk.sel { outline: 2px solid var(--ink); box-shadow: 0 0 0 10px rgba(253,201,66,.38); margin-top: 52px !important; margin-bottom: 18px !important; }
.d-blk .d-btag { font-family: 'DM Sans', sans-serif; position: absolute; top: -32px; left: -8px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; background: var(--ink); color: var(--paper); padding: 3px 10px; border-radius: 999px; }
.d-blk .d-bctl { position: absolute; top: -34px; right: -8px; display: flex; gap: 4px; }
.d-blk .d-bctl span { height: 26px; min-width: 26px; padding: 0 8px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper); font-size: 12px; font-weight: 700; }
.d-blk .d-bctl span.del { color: var(--coral-text); }
.d-plus { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--ink-3); font-size: 13px; position: relative; }
.d-plus::before, .d-plus::after { content: ''; flex: 1; border-top: 1.5px dashed var(--rule); }
.d-plus > i { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-style: normal; font-weight: 700; color: var(--ink); background: var(--paper); }
.d-plus.open > i { background: var(--ink); color: var(--paper); }
.d-pop { position: absolute; z-index: 6; left: 50%; transform: translateX(-50%); top: 42px; width: 580px; background: var(--paper); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 6px 8px 0 rgba(28,25,28,.2); padding: 14px; color: var(--ink); }
.d-pop .d-search { margin: 0 0 12px; width: 100%; flex: none; }
.d-pop .hint { font-size: 12.5px; color: var(--ink-3); margin: 12px 2px 0; }
kbd { font: 700 12px ui-monospace, Consolas, monospace; border: 1.5px solid var(--ink); border-radius: 6px; padding: 1px 6px; background: var(--paper-2); color: var(--ink); }

.d-side { padding: 22px 22px 40px; background: var(--paper-2); }
.d-side h4 { font-family: 'Fraunces', serif; font-weight: 900; font-size: 20px; margin: 2px 0 14px; }
.d-tabs { display: flex; gap: 6px; padding: 4px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 999px; margin-bottom: 18px; }
.d-tabs span { flex: 1; text-align: center; padding: 8px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.d-tabs span.on { background: var(--ink); color: var(--paper); }
.d-tabs span b { font-family: 'Fraunces', serif; font-weight: 900; font-size: 12px; color: var(--coral-text); margin-left: 4px; }
.d-tabs span.on b { color: var(--yellow); }
.d-side .back { font-size: 13.5px; font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); text-underline-offset: 3px; display: inline-block; margin-bottom: 12px; }
.d-side .w-field { margin-bottom: 14px; }
.d-side .w-input { min-height: 42px; padding: 10px 12px; font-size: 15px; }
.d-src { display: grid; grid-template-columns: 22px 1fr 18px; gap: 8px; align-items: start; padding: 10px 0; border-bottom: 1px dashed var(--rule); font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.d-src b { font-family: 'Fraunces', serif; font-weight: 900; color: var(--coral-text); }
.d-src i { font-style: normal; color: var(--ink-4); letter-spacing: 1px; }
.d-src u { display: block; color: var(--ink-3); font-size: 12px; margin-top: 3px; text-decoration-color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-src.sel { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 12px; padding: 10px; margin: 6px -10px; }
.d-newcat { display: flex; gap: 8px; margin-top: 10px; }
.d-newcat .w-input { min-height: 40px; padding: 8px 12px; font-size: 14px; flex: 1; }
.d-newcat .w-btn { flex: 0 0 auto; min-height: 40px; padding: 0 16px; font-size: 14px; }
.d-done { display: flex; gap: 10px; margin-top: 8px; }
.d-done .w-btn { min-height: 44px; }

/* preview */
.d-prevbar { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 20px; background: var(--yellow); border-bottom: 1.5px solid var(--ink); font-weight: 700; font-size: 15px; }
.d-prevbar .grow { flex: 1; }
.d-prevbar .w-btn { flex: 0 0 auto; padding: 0 20px; min-height: 42px; }
.d-prevbar .w-devtoggle i { font-size: 13px; padding: 6px 14px; }
.d-prevstage { height: 700px; overflow: hidden; background: var(--paper-3); }
.d-prevstage.desk img { width: 100%; display: block; }
.d-prevstage.phone { display: flex; justify-content: center; padding-top: 28px; }
.d-prevstage.phone .pframe { width: 410px; height: 820px; border: 10px solid var(--ink); border-radius: 50px; overflow: hidden; background: var(--paper); box-shadow: 8px 10px 0 rgba(28,25,28,.16); }
.d-prevstage.phone .pframe img { width: 100%; display: block; }
