/* Wren's page on saymurmur.app. Everything comes from /style.css; this file only swaps in Wren's
   sky blue and frost neutrals and adds the few layouts Murmur's page doesn't have. Scoped to body.wren. */
body.wren {
  --accent: #2f6fca;            /* sky-600 */
  --accent-press: #1d4683;      /* sky-800 */
  --accent-soft: rgba(47, 111, 202, 0.1);
  --beak: #f5a524;              /* the one warm spark: used once, on the hero spec line */
  --sky-top: #eaf4ff;           /* the morning field behind the paper bird */
}
:root:not([data-theme="dark"]) body.wren { --bg-soft: #f6f8fa; --card: #eef2f5; --card-hi: #e3e9ef; }
:root[data-theme="dark"] body.wren {
  --accent: #4a89de;            /* sky-500 */
  --accent-press: #2f6fca;
  --accent-soft: rgba(74, 137, 222, 0.16);
  --sky-top: #17233a;
}

/* Nav: "Wren by Murmur" */
/* The icon carries macOS's transparent margin, so it's drawn a touch larger than Murmur's to look the same size. */
.wren .brand img { width: 34px; height: 34px; margin: -3px; border-radius: 0; }
.wren .nav .by { margin-left: -14px; font-size: 0.8rem; color: var(--tertiary); white-space: nowrap; }
.wren .nav .by:hover { color: var(--text); }
@media (max-width: 420px) { .wren .nav .wrap { gap: 14px; } .wren .nav .by { margin-left: -6px; } }

/* Hero: centered on a pale sky wash, the app window under it */
.w-hero { padding: clamp(56px, 8vw, 96px) 0 0; text-align: center; background: linear-gradient(var(--sky-top), var(--bg) 72%); }
.w-icon { width: 112px; height: 112px; margin: 0 auto 22px; }
.w-hero h1 { font-size: clamp(2.8rem, 7.4vw, 5.6rem); line-height: 1; }
.w-hero .lede { max-width: 540px; margin: 22px auto 0; }
.w-hero .spec .free { display: inline-flex; align-items: center; gap: 7px; color: var(--secondary); }
.w-hero .spec .free::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--beak); }

/* Screenshots: real frames from the app, on a card */
.shot { overflow: hidden; border-radius: 16px; border: 0.5px solid var(--hairline); background: var(--card); box-shadow: var(--shadow); }
.shot img { width: 100%; height: auto; }
.hero-shot { max-width: 1040px; margin: clamp(48px, 6vw, 72px) auto 0; border-radius: 12px; border-color: rgba(0, 0, 0, 0.3); box-shadow: 0 40px 80px -30px rgba(16, 40, 80, 0.45); }
:root[data-theme="dark"] .wren .hero-shot { border-color: rgba(255, 255, 255, 0.14); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7); }
.shot.wide { max-width: 1040px; margin: 0 auto; }

/* Highlights: copy and screenshot side by side, alternating */
.rows { display: grid; gap: clamp(88px, 11vw, 136px); }
.row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.row.flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.row.flip .copy { order: 2; }
.row h2 { margin: 8px 0 16px; font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.06; letter-spacing: -0.035em; }
.row p:not(.eyebrow) { margin: 0 0 12px; font-size: 1.05rem; color: var(--secondary); }
.row .eyebrow { margin: 0; }
.row b { color: var(--text); font-weight: 600; }
@media (max-width: 900px) { .row, .row.flip { grid-template-columns: 1fr; } .row.flip .copy { order: 0; } }

.wren code { padding: 1px 5px; border-radius: 5px; background: var(--card); font: 0.86em ui-monospace, "SF Mono", Menlo, monospace; color: var(--text); }

/* ───────── Everything in Wren: Murmur's bento, every tile a small working demo ───────── */
.w-bento { grid-auto-flow: dense; }
.w-bento .tile { min-height: 360px; }
.w-bento .tile p code { background: var(--card); }
.w-bento .kbd { font-size: 0.8em; }
.w-bento .viz { min-height: 220px; }
.w-bento .viz > * { width: 100%; }
/* Zero-specificity reset, so each control's own class wins */
.w-bento :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.w-bento button.kbd { background: var(--kbd-bg); padding: 1px 9px; }

/* A small app window or panel inside a tile */
.pane {
  position: relative; overflow: hidden; border-radius: 12px; background: var(--bg); text-align: left;
  border: 0.5px solid var(--hairline); font-size: 0.82rem; line-height: 1.45;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 28px -14px rgba(16, 40, 80, 0.22);
}
:root[data-theme="dark"] .wren .pane { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 30px -14px rgba(0, 0, 0, 0.75); }
.pane-bar { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 12px; border-bottom: 0.5px solid var(--hairline); font-size: 0.74rem; color: var(--secondary); }
.pane-bar b { color: var(--text); font-weight: 600; }
.pane .lights { display: flex; gap: 6px; }
.pane .lights i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.pane .lights i:nth-child(2) { background: #febc2e; }
.pane .lights i:nth-child(3) { background: #28c840; }
.cb { width: 14px; height: 14px; flex: none; display: inline-grid; place-items: center; border-radius: 4px; border: 1.5px solid var(--tertiary); transition: background-color 200ms, border-color 200ms; }
.cb.on { background: var(--accent); border-color: var(--accent); }
.cb.on::after { content: ""; width: 7px; height: 3.5px; margin-top: -2px; border: solid #fff; border-width: 0 0 1.7px 1.7px; transform: rotate(-45deg); }
@keyframes w-in { from { opacity: 0; max-height: 0; transform: translateY(-6px); } to { max-height: 48px; } }

/* What changed */
.wc { max-width: 560px; }
.wc-agent { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 9px; border-radius: 999px; background: #1d1d20; color: #fff; font-size: 0.68rem; font-weight: 500; opacity: 0; transform: translateY(-3px); transition: opacity 240ms, transform 320ms var(--ease); }
.wc-agent.on { opacity: 1; transform: none; }
:root[data-theme="dark"] .wren .wc-agent { background: #2c2c31; box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.14); }
.wc-agent i { width: 6px; height: 6px; border-radius: 50%; background: #30d158; }
.wc-doc { height: 244px; padding: 14px 20px 0; }
.tile .wc-h { margin: 0 0 6px; color: var(--text); font-size: 0.98rem; font-weight: 700; letter-spacing: -0.01em; }
.wc-list { list-style: none; margin: 0; padding: 0; }
.wc-list li { position: relative; display: flex; align-items: center; gap: 10px; margin: 0 -10px; padding: 5px 10px; border-radius: 7px; color: var(--text); transition: background-color 700ms, box-shadow 200ms; }
.wc-list li::before { content: ""; position: absolute; left: -5px; top: 5px; bottom: 5px; width: 3px; border-radius: 2px; background: var(--green); opacity: 0; transition: opacity 700ms; }
.wc-list li.chg { background: color-mix(in srgb, var(--green) 13%, transparent); }
.wc-list li.chg::before { opacity: 1; }
.wc-list li.at { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--green) 70%, transparent); }
.wc-list li.new { animation: w-in 560ms var(--ease) both; }
.wc-pill {
  position: absolute; left: 50%; bottom: 12px; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 13px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-size: 0.76rem; font-weight: 600; font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); opacity: 0; transform: translate(-50%, 10px) scale(0.94); pointer-events: none;
  transition: opacity 220ms, transform 380ms cubic-bezier(0.3, 1.3, 0.5, 1);
}
.wc-pill.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.wc-pill:active { transform: translate(-50%, 0) scale(0.96); }
.wc-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* Live reload: the banner slides in under the title bar, as in the app */
.lr { max-width: 320px; }
.lr-state { margin-left: auto; font-size: 0.68rem; font-weight: 600; color: var(--tertiary); transition: color 200ms; }
.lr-state.ok { color: var(--green); }
.lr-banner { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 460ms var(--ease), opacity 260ms; }
.lr-banner.off { grid-template-rows: 0fr; opacity: 0; pointer-events: none; }
.lr-banner > div { min-height: 0; overflow: hidden; }
.lr-banner .in { display: grid; gap: 9px; margin: 10px 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 0.78rem; }
.lr-banner .msg { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.lr-banner svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
.lr-banner .btns { display: flex; justify-content: flex-end; gap: 8px; }
.lr-banner button { height: 26px; padding: 0 12px; border-radius: 999px; background: var(--btn-2); font-size: 0.76rem; font-weight: 600; transition: background-color 150ms, transform 120ms; }
.lr-banner button:hover { background: var(--btn-2-hover); }
.lr-banner button.pri { background: var(--accent); color: #fff; }
.lr-banner button:active, .lr-banner button.press { transform: scale(0.94); }
.lr-body { display: grid; gap: 2px; padding: 12px 16px 16px; }
.tile .lr-h { margin: 0 0 4px; color: var(--text); font-size: 0.98rem; font-weight: 700; letter-spacing: -0.01em; }
.lr-row { display: flex; align-items: flex-start; gap: 10px; padding: 4px 0; color: var(--text); }
.lr-row .cb { margin-top: 2px; }
.lr-text { border-radius: 4px; }
.lr-text.fresh { animation: lr-flash 1.8s ease-out; }
@keyframes lr-flash { 0%, 35% { background: color-mix(in srgb, var(--green) 24%, transparent); } }
.lr .caret { display: inline-block; width: 1.5px; height: 1.1em; margin-left: 1px; vertical-align: -0.2em; background: var(--accent); animation: blink 1.05s steps(1) infinite; }
.lr:not(.editing) .caret { display: none; }

/* Diagrams */
.dg { max-width: 320px; display: grid; gap: 12px; }
.dg-view { position: relative; overflow: hidden; border-radius: 12px; background: var(--card); touch-action: pan-y; }
.dg.zoomed .dg-view { cursor: grab; touch-action: none; }
.dg-view.grabbing { cursor: grabbing; }
.dg-stage { transform-origin: 50% 50%; transition: transform 700ms var(--ease); }
.dg-view.grabbing .dg-stage { transition: none; }
.dg svg { display: block; width: 100%; height: auto; }
.dg .n rect { fill: var(--surface); stroke: color-mix(in srgb, var(--accent) 45%, transparent); stroke-width: 1; transition: fill 200ms; }
.dg .n:hover rect { fill: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.dg .n text { fill: var(--text); font: 500 10px -apple-system, BlinkMacSystemFont, system-ui, sans-serif; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.dg .e path { fill: none; stroke: var(--tertiary); stroke-width: 1.2; }
.dg marker path { fill: var(--tertiary); }
.dg .lbl { fill: var(--secondary); font: 9px -apple-system, system-ui, sans-serif; }
.dg .packet { fill: var(--accent); }
.dg-tools { position: absolute; right: 7px; bottom: 7px; display: flex; align-items: center; padding: 2px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 0.5px var(--hairline), 0 2px 8px rgba(0, 0, 0, 0.1); font-size: 0.7rem; }
.dg-tools button { width: 24px; height: 24px; border-radius: 50%; font-size: 0.95rem; line-height: 1; color: var(--secondary); }
.dg-tools button:hover { background: var(--btn-2); color: var(--text); }
.dg-tools span { min-width: 34px; text-align: center; color: var(--secondary); font-variant-numeric: tabular-nums; }
.tile .dg-math { justify-self: center; margin: 0; color: var(--text); font: italic 1.08rem/1 "Times New Roman", "New York", ui-serif, serif; }
.dg-math .r { font-style: normal; }
.dg-math sub { font-size: 0.64em; }

/* Open Quickly and Find in Project share the search field */
.oq, .fp { max-width: 330px; }
.oq-q { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-bottom: 0.5px solid var(--hairline); color: var(--tertiary); cursor: text; }
.oq-q svg { width: 15px; height: 15px; flex: none; }
.oq-q input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 0.88rem; color: var(--text); }
.oq-q input::placeholder { color: var(--tertiary); }
.oq-q:focus-within { color: var(--accent); }
.oq-list { list-style: none; margin: 0; padding: 6px; height: 170px; }
.oq-list li { display: flex; align-items: center; gap: 9px; height: 39px; padding: 0 9px; border-radius: 8px; cursor: pointer; }
.oq-list li[aria-selected="true"] { background: var(--accent-soft); }
.oq-list li.opened { animation: oq-open 600ms ease-out; }
@keyframes oq-open { 30% { background: color-mix(in srgb, var(--accent) 30%, transparent); } }
.oq-list svg { width: 14px; height: 14px; flex: none; color: var(--tertiary); }
.oq-list .nm { display: grid; min-width: 0; line-height: 1.25; }
.oq-list .nm span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; color: var(--text); }
.oq-list .nm b { color: var(--accent); font-weight: 700; }
.oq-list .nm small { font-size: 0.68rem; color: var(--tertiary); }
.oq-list .t { margin-left: auto; flex: none; font-size: 0.68rem; color: var(--tertiary); }
.oq-list li.none { justify-content: center; color: var(--tertiary); cursor: default; }

/* Tick it in the file */
.tk { max-width: 290px; display: grid; gap: 4px; text-align: left; }
.tk label { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; font-size: 0.92rem; cursor: pointer; transition: background-color 150ms; }
.tk label:hover { background: var(--card); }
.tk input { appearance: none; -webkit-appearance: none; margin: 0; width: 18px; height: 18px; flex: none; display: grid; place-items: center; border-radius: 5px; border: 1.5px solid var(--tertiary); cursor: pointer; transition: background-color 180ms, border-color 180ms, transform 120ms; }
.tk input:active { transform: scale(0.88); }
.tk input:checked { background: var(--accent); border-color: var(--accent); }
.tk input:checked::after { content: ""; width: 9px; height: 4.5px; margin-top: -2px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.tk input:checked + span { color: var(--secondary); }
.tk-src { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; margin-top: 8px; padding: 9px 12px; border-radius: 10px; background: var(--card); font-size: 0.76rem; }
.tk-src code { grid-column: 1 / -1; }
.tk-src .f { flex: none; color: var(--tertiary); font-weight: 600; }
.wren .tk-src code { min-width: 0; padding: 0; overflow: hidden; background: none; white-space: pre; text-overflow: ellipsis; border-radius: 4px; }
.tk-src code b { color: var(--green); }
.tk-src code.flash { animation: lr-flash 1.2s ease-out; }
.tk-saved { font-weight: 600; color: var(--green); opacity: 0; transition: opacity 200ms; }
.tk-saved.on { opacity: 1; }

/* Quick Look */
.ql { position: relative; height: 230px; display: grid; place-content: center; justify-items: center; gap: 16px; }
.ql-file { display: grid; justify-items: center; gap: 7px; }
.ql-file svg { width: 46px; height: 56px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.14)); }
.ql-file .pg { fill: #fff; stroke: rgba(0, 0, 0, 0.14); }
.ql-file .fold { fill: #eef2f5; stroke: rgba(0, 0, 0, 0.14); }
.ql-file text { fill: var(--accent); font: 700 10px -apple-system, system-ui, sans-serif; text-anchor: middle; }
.ql-file span { padding: 1px 8px; border-radius: 5px; background: var(--accent); color: #fff; font-size: 0.74rem; font-weight: 500; }
.w-bento .ql-key { min-width: 112px; height: 32px; justify-content: center; font-size: 0.78rem; transition: transform 90ms, box-shadow 90ms, background-color 150ms; }
.w-bento .ql-key:active, .w-bento .ql-key.down { transform: translateY(2px); box-shadow: inset 0 0 0 0.5px var(--kbd-edge); }
.ql-peek { position: absolute; inset: 0; z-index: 2; opacity: 0; transform: scale(0.25); transform-origin: 50% 32%; pointer-events: none; transition: opacity 200ms, transform 460ms cubic-bezier(0.3, 1.15, 0.5, 1); }
.ql.open .ql-peek { opacity: 1; transform: none; pointer-events: auto; cursor: zoom-out; }
.ql-peek .open { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: var(--btn-2); font-size: 0.68rem; font-weight: 600; color: var(--text); }
.ql-doc { display: grid; gap: 9px; padding: 14px 18px; }
.ql-doc .h { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.ql-doc .note { padding: 7px 10px; border-radius: 8px; background: var(--accent-soft); font-size: 0.74rem; color: var(--text); }
.ql-doc .note b { display: block; font-size: 0.68rem; color: var(--accent); }
.ql-doc .flow { width: 100%; height: auto; }
.ql-doc .flow rect { fill: var(--surface); stroke: color-mix(in srgb, var(--accent) 45%, transparent); }
.ql-doc .flow path { stroke: var(--tertiary); fill: none; }
.ql-doc .bars { display: grid; gap: 6px; }
.ql-doc .bars i { display: block; height: 6px; border-radius: 3px; background: var(--card-hi); }
.ql-doc .bars i:nth-child(2) { width: 86%; }
.ql-doc .bars i:nth-child(3) { width: 58%; }

/* Themes: a real document, restyled by each theme */
.th { max-width: 660px; display: grid; gap: 14px; }
.th-ctl { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--card); }
.seg button { height: 28px; padding: 0 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 500; color: var(--secondary); transition: background-color 220ms, color 220ms, box-shadow 220ms; }
.seg button:hover { color: var(--text); }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 0.5px var(--hairline); }
:root[data-theme="dark"] .wren .seg button[aria-checked="true"] { background: rgba(255, 255, 255, 0.16); }
.th-doc {
  --d-bg: #ffffff; --d-ink: #1b2733; --d-mute: #5a6573; --d-acc: #2f6fca; --d-line: #e3e9ef; --d-code: #eef2f5; --d-alert: #7c4dde;
  --d-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  height: 204px; overflow: hidden; padding: 18px 24px; border-radius: 12px; text-align: left; border: 0.5px solid var(--hairline);
  -webkit-mask-image: linear-gradient(#000 76%, transparent); mask-image: linear-gradient(#000 76%, transparent);
  background: var(--d-bg); color: var(--d-ink); font: 0.84rem/1.55 var(--d-font);
  transition: background-color 420ms var(--ease), color 420ms var(--ease);
}
.th-doc[data-t="wren"][data-m="dark"] { --d-bg: #15191e; --d-ink: #e6ebf0; --d-mute: #97a3b0; --d-acc: #74a9ec; --d-line: #2a3139; --d-code: #222930; --d-alert: #b197fc; }
.th-doc[data-t="github"][data-m="light"] { --d-bg: #ffffff; --d-ink: #1f2328; --d-mute: #59636e; --d-acc: #0969da; --d-line: #d1d9e0; --d-code: #eff1f3; --d-alert: #8250df; }
.th-doc[data-t="github"][data-m="dark"] { --d-bg: #0d1117; --d-ink: #f0f6fc; --d-mute: #9198a1; --d-acc: #4493f8; --d-line: #3d444d; --d-code: #262c36; --d-alert: #ab7df8; }
.th-doc[data-t="paper"][data-m="light"] { --d-bg: #f7f2e7; --d-ink: #2d2a24; --d-mute: #6e6658; --d-acc: #8a5a2b; --d-line: #e2d9c6; --d-code: #ede5d3; --d-alert: #9a4a2e; }
.th-doc[data-t="paper"][data-m="dark"] { --d-bg: #1e1b16; --d-ink: #ece4d4; --d-mute: #a89d8a; --d-acc: #d9a86c; --d-line: #3a342b; --d-code: #2b271f; --d-alert: #e0956f; }
.th-doc[data-t="contrast"][data-m="light"] { --d-bg: #ffffff; --d-ink: #000000; --d-mute: #1a1a1a; --d-acc: #0033cc; --d-line: #000000; --d-code: #e8e8e8; --d-alert: #5a00b5; }
.th-doc[data-t="contrast"][data-m="dark"] { --d-bg: #000000; --d-ink: #ffffff; --d-mute: #ececec; --d-acc: #ffd60a; --d-line: #ffffff; --d-code: #1f1f1f; --d-alert: #d0a8ff; }
.th-doc[data-f="serif"] { --d-font: "New York", ui-serif, Charter, Georgia, serif; }
@media (max-width: 620px) { .th-doc { height: 250px; padding: 16px 18px; } }
.th-doc[data-f="mono"] { --d-font: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.78rem; }
.th-doc .d-h { margin: 0 0 12px; padding-bottom: 7px; border-bottom: 1px solid var(--d-line); color: var(--d-ink); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.th-doc .d-alert { margin-bottom: 12px; padding: 4px 12px; border-left: 3px solid var(--d-alert); color: var(--d-ink); }
.th-doc .d-alert b { display: block; color: var(--d-alert); font-size: 0.78rem; }
.th-doc .d-sub { margin: 0 0 4px; color: var(--d-ink); font-size: 0.95rem; font-weight: 650; }
.th-doc ol { margin: 0; padding-left: 1.4em; }
.th-doc li::marker { color: var(--d-mute); }
.wren .th-doc code { background: var(--d-code); color: var(--d-ink); }
.th-doc u { color: var(--d-acc); text-decoration: none; }

/* Fix a line: a split editor with a live preview */
.se { max-width: 660px; }
.w-bento .se-toggle { margin-left: auto; height: 22px; font-size: 0.72rem; transition: background-color 150ms, color 150ms; }
.w-bento .se-toggle[aria-pressed="true"] { background: var(--accent); color: #fff; box-shadow: none; }
.se-panes { display: grid; grid-template-columns: 1fr 1fr; height: 210px; transition: grid-template-columns 520ms var(--ease); }
.se.reading .se-panes { grid-template-columns: 0fr 1fr; }
.se textarea {
  min-width: 0; width: 100%; height: 100%; margin: 0; padding: 14px 16px; resize: none; border: 0; outline: 0; border-radius: 0;
  border-right: 0.5px solid var(--hairline); background: var(--bg-soft); color: var(--text); font: 0.76rem/1.65 ui-monospace, "SF Mono", Menlo, monospace;
}
.se textarea:focus { background: color-mix(in srgb, var(--accent) 5%, var(--bg-soft)); }
.se.reading textarea { padding-inline: 0; border-right: 0; }
.se-out { min-width: 0; overflow: auto; padding: 14px 20px; color: var(--text); }
.tile .se-out p { margin: 0 0 8px; color: var(--text); font-size: 0.84rem; }
.tile .se-out .h1 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.tile .se-out .h2 { padding-bottom: 4px; border-bottom: 0.5px solid var(--hairline); font-size: 1rem; font-weight: 700; }
.tile .se-out .h3 { font-size: 0.9rem; font-weight: 650; }
.se-out ul, .se-out ol { margin: 0 0 8px; padding-left: 1.2em; }
.se-out li.task { display: flex; align-items: center; gap: 8px; margin-left: -1.2em; list-style: none; }
.se-out blockquote { margin: 0 0 8px; padding: 2px 0 2px 10px; border-left: 3px solid var(--accent); color: var(--secondary); }
.se-out code { font-size: 0.8em; }
.se-out .lnk { color: var(--accent); }
@media (max-width: 620px) {
  .se-panes, .se.reading .se-panes { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; height: 400px; transition: grid-template-rows 520ms var(--ease); }
  .se.reading .se-panes { grid-template-rows: 0fr 1fr; }
  .se textarea { border-right: 0; border-bottom: 0.5px solid var(--hairline); }
  .se.reading textarea { padding-block: 0; border-bottom: 0; }
}

/* Folder sidebar */
.fs { max-width: 290px; height: 230px; padding: 8px; }
.fs-row { display: flex; align-items: center; gap: 6px; width: 100%; height: 29px; padding: 0 9px 0 calc(6px + var(--d, 0) * 16px); border-radius: 7px; font-size: 0.82rem; text-align: left; transition: background-color 150ms; }
.fs-row:hover { background: var(--card); }
.fs-row.sel { background: var(--accent-soft); }
.fs-row.sel .nm { color: var(--accent); font-weight: 600; }
.fs-row .chev { width: 10px; height: 10px; flex: none; color: var(--tertiary); transition: transform 220ms var(--ease); }
.fs-row.open .chev { transform: rotate(90deg); }
.fs-row .sp { width: 10px; flex: none; }
.fs-row .ic { width: 15px; height: 15px; flex: none; }
.fs-row .ic.folder { color: color-mix(in srgb, var(--accent) 70%, #fff); }
.fs-row .ic.doc { color: var(--tertiary); }
.fs-row .nm { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text); }
.fs-row .dot { margin-left: auto; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--green); }
.fs-row .dot.ping { animation: dot-in 700ms cubic-bezier(0.3, 1.4, 0.5, 1); }
@keyframes dot-in { from { transform: scale(0); } 55% { transform: scale(1.7); } }
.fs-row.new { animation: w-in 520ms var(--ease) both; }

/* Find in Project */
.fp-res { height: 178px; overflow: hidden; padding: 0 6px 8px; }
.fp-sum, .fp-empty { padding: 8px 8px 2px; font-size: 0.7rem; color: var(--tertiary); }
.fp-empty { padding-top: 14px; }
.fp-file { display: flex; align-items: center; gap: 7px; padding: 6px 6px 3px; font-size: 0.76rem; font-weight: 600; color: var(--text); }
.fp-file svg { width: 13px; height: 13px; flex: none; color: var(--tertiary); }
.fp-file small { margin-left: auto; font-size: 0.68rem; font-weight: 500; color: var(--tertiary); }
.fp-line { display: flex; gap: 8px; padding: 2px 6px 2px 8px; border-radius: 6px; font-size: 0.75rem; color: var(--secondary); white-space: nowrap; }
.fp-line:hover { background: var(--card); }
.fp-line .ln { min-width: 18px; flex: none; text-align: right; color: var(--tertiary); font-variant-numeric: tabular-nums; }
.fp-line .tx { overflow: hidden; text-overflow: ellipsis; }
.fp mark { padding: 0 1px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }

/* Terminal: dark in both themes, like Terminal.app's default */
.term { max-width: 330px; overflow: hidden; border-radius: 12px; background: #1c1d21; text-align: left; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.45), 0 12px 28px -14px rgba(0, 0, 0, 0.5); }
:root[data-theme="dark"] .wren .term { box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.12), 0 14px 30px -14px rgba(0, 0, 0, 0.8); }
.term-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: #27282d; }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: auto; margin-right: auto; padding-right: 39px; font-size: 0.68rem; color: rgba(235, 235, 245, 0.45); }
.term pre { height: 186px; margin: 0; padding: 12px 14px; overflow: hidden; color: #ececf1; font: 0.75rem/1.7 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; }
.term .p { color: #7cb4ff; }
.term .d { color: rgba(235, 235, 245, 0.45); }
.term .cur { display: inline-block; width: 7px; height: 1.15em; vertical-align: -0.22em; background: #ececf1; animation: blink 1.05s steps(1) infinite; }

/* Export */
.ex { max-width: 320px; display: grid; gap: 14px; }
.ex-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ex-btns button { display: grid; justify-items: center; gap: 6px; padding: 14px 4px 12px; border-radius: 14px; background: var(--card); transition: background-color 160ms, transform 120ms, box-shadow 200ms; }
.ex-btns button:hover { background: var(--card-hi); }
.ex-btns button.on { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent); }
.ex-btns button:active { transform: scale(0.95); }
.ex-btns svg { width: 26px; height: 32px; }
.ex-btns .pg { fill: #fff; stroke: rgba(0, 0, 0, 0.16); }
.ex-btns text { fill: #fff; font: 700 5.6px -apple-system, system-ui, sans-serif; text-anchor: middle; }
.ex-btns b { font-size: 0.82rem; font-weight: 600; }
.ex-btns .kbd { font-size: 0.66rem; }
.ex-toast { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; border-radius: 12px; background: var(--card); font-size: 0.8rem; text-align: left; }
.ex-toast.pop { animation: ex-pop 460ms cubic-bezier(0.3, 1.3, 0.5, 1); }
@keyframes ex-pop { from { opacity: 0.3; transform: translateY(6px) scale(0.97); } }
.ex-toast .ok { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; }
.ex-toast .ok svg { width: 12px; height: 12px; }
.ex-toast .ok.idle { background: var(--card-hi); color: var(--secondary); }
.ex-toast .ok.idle svg { width: 13px; height: 13px; }
.ex-toast b { display: block; font-weight: 600; color: var(--text); }
.ex-toast span span { color: var(--secondary); font-size: 0.74rem; }

/* And the small things */
.w-more-h { margin: 48px 0 0; font-size: 0.9rem; font-weight: 600; color: var(--tertiary); }
.w-more { margin-top: 14px; }
.w-more > span { display: inline-flex; align-items: center; gap: 6px; }
.w-more .kbd { font-size: 0.78em; }

@media (prefers-reduced-motion: reduce) {
  .dg .packet { display: none; }
  .lr .caret, .term .cur { animation: none; }
  .wc-list li.new, .fs-row.new, .fs-row .dot.ping { animation: none; }
}

.wren .closing .w-icon { width: 96px; height: 96px; margin-bottom: 24px; }
.wren .closing h2 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
