/* dostoevsky.app — the app's dark theme (crates/app/src/theme.rs), no scripts, no trackers. */
@font-face { font-family: "Plex Mono"; src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/IBMPlexMono-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/IBMPlexMono-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/Caveat.ttf") format("truetype"); font-display: swap; }

:root {
  --bg: #070c1f; --panel: #0b111d; --raised: #121622; --line: #1a2033;
  --text: #f5cab3; --text-2: #a99f9f; --muted: #79737d; --faint: #3a4058;
  --accent: #8a80d8; --pen: #545278; --para: #a8735a; --mark: #d6a35c;
  --measure: 46rem;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f5f0e6; --panel: #eee7d9; --raised: #e6dece; --line: #ddd3c1;
          --text: #3a2a22; --text-2: #6e625a; --muted: #8d8279; --faint: #c8bdaa;
          --accent: #5b4fb8; --pen: #9f98d6; --para: #a8735a; --mark: #a8741c; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.75 "Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.5rem; }
.wide { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.5rem;
       font-size: 13px; color: var(--muted); }
.top a { color: var(--muted); text-decoration: none; }
.top a:hover { color: var(--text); }
.top nav a + a { margin-left: 1.4rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text-2) !important; }
.brand img { width: 22px; height: 22px; }

/* Hero */
.hero { text-align: center; padding: 4.5rem 0 2.5rem; }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); line-height: 1.25; margin: 0 0 1.4rem; font-weight: 700; letter-spacing: -.01em; }
.hero p { color: var(--text-2); max-width: 38rem; margin: 0 auto; }
.wavy { text-decoration: underline wavy var(--pen); text-decoration-thickness: 1.5px; text-underline-offset: 7px; }
.label { font: 400 1.35rem/1 "Caveat", cursive; color: var(--accent); }
.cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: 2.2rem 0 .8rem; }
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .7rem 1.25rem; border-radius: 8px;
       border: 1px solid var(--line); background: var(--raised); color: var(--text); text-decoration: none; font-size: 14px; }
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0b0f22; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); color: #0b0f22; }
.small { font-size: 12.5px; color: var(--muted); }
.shot { margin: 2.5rem auto 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
        box-shadow: 0 30px 80px rgba(0,0,0,.45); }

/* Sections */
section.wrap, section.wide { padding-top: 5.5rem; }
h2 { font-size: 1.45rem; line-height: 1.35; margin: 0 0 1rem; }
h3 { font-size: 1.05rem; margin: 2rem 0 .4rem; }
p { margin: 0 0 1rem; }
.lead { color: var(--text-2); }
kbd { font: inherit; font-size: .85em; padding: .05rem .4rem; border: 1px solid var(--line); border-bottom-width: 2px;
      border-radius: 5px; background: var(--raised); color: var(--text); white-space: nowrap; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.three div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem 1.3rem; }
.three h3 { margin-top: 0; }
.three p { color: var(--text-2); font-size: 14px; margin: 0; }
.ghost { opacity: .14; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 2.5rem; align-items: center; }
.feature.flip { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.feature.flip .text { order: 2; }
.feature img { border-radius: 10px; border: 1px solid var(--line); }
.feature ul { padding-left: 1.1rem; color: var(--text-2); margin: 0; }
.feature li { margin: .3rem 0; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; margin: 1.2rem 0 0; }
.pills li { font-size: 12.5px; color: var(--text-2); border: 1px solid var(--line); border-radius: 99px; padding: .2rem .75rem; }
.quote { border-left: 2px solid var(--para); padding: .2rem 0 .2rem 1.2rem; color: var(--text-2); }

/* Prose pages */
.prose { padding: 3rem 0 2rem; }
.prose h1 { font-size: 1.8rem; margin: 0 0 .5rem; }
.prose h2 { font-size: 1.15rem; margin: 2.4rem 0 .6rem; }
.prose li { margin: .35rem 0; }
.prose ul { padding-left: 1.2rem; }
.updated { color: var(--muted); font-size: 13px; margin-bottom: 2rem; }
dt { font-weight: 700; margin-top: 1.4rem; }
dd { margin: .3rem 0 0; color: var(--text-2); }

footer { margin: 6rem 0 0; padding: 2rem 1.5rem 3rem; border-top: 1px solid var(--line);
         font-size: 12.5px; color: var(--muted); text-align: center; }
footer a { color: var(--muted); }
footer nav a + a { margin-left: 1.2rem; }

@media (max-width: 760px) {
  .three, .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); }
  .feature.flip .text { order: 0; }
  .top nav a.opt { display: none; }
  .hero { padding-top: 3rem; }
}
.gap { margin-top: 1rem; }
.cta.left { justify-content: flex-start; }

/* The two modes: a switch like the app's header, done with radio buttons (no scripts). */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
      clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.modes { text-align: center; margin-top: 1.5rem; }
.switch { display: inline-flex; gap: .4rem; padding: .3rem; border: 1px solid var(--line);
          border-radius: 99px; background: var(--panel); }
.switch label { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem 1.1rem;
                border-radius: 99px; font-size: 14px; color: var(--muted); cursor: pointer;
                transition: color .2s, background .2s; }
.switch label:hover { color: var(--text-2); }
.ico { flex: none; }
#mode-writing:checked ~ .switch label[for="mode-writing"],
#mode-editing:checked ~ .switch label[for="mode-editing"] { color: var(--accent); background: var(--raised);
  box-shadow: inset 0 -2px 0 var(--accent); }
#mode-writing:focus-visible ~ .switch label[for="mode-writing"],
#mode-editing:focus-visible ~ .switch label[for="mode-editing"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.frames { display: grid; margin-top: 1.4rem; }
.frame { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
.frame img { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.frame figcaption { margin-top: 1rem; color: var(--text-2); font-size: 14px; }
#mode-writing:checked ~ .frames .f-writing,
#mode-editing:checked ~ .frames .f-editing { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .frame, .switch label { transition: none; } }

.chip { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1.4rem; padding: .25rem .8rem;
        border: 1px solid var(--line); border-radius: 99px; font-size: 13px; color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: 2.5rem; }
.grid div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.25rem; }
.grid h3 { margin: 0 0 .35rem; font-size: .98rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.grid h3 kbd { font-weight: 400; font-size: .78rem; color: var(--text-2); }
.grid p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.65; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: minmax(0, 1fr); } }
