@font-face {
  font-family: "Golos Text";
  src: url("/assets/GolosText-Variable-3ffd4818.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/Cormorant-500-cyrillic-8d840d90.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/Cormorant-500-latin-a7e1075e.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/Cormorant-600-cyrillic-47d936b0.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/Cormorant-600-latin-a40c05a2.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/Cormorant-500-i-cyrillic-2dedc306.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/Cormorant-500-i-latin-e8848733.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
  font-display: swap;
}

:root {
  --canvas: #14110e;
  --surface: #f6f0e6;
  --surface-deep: #efe2d0;
  --text: #1c1612;
  --text-muted: #5a5148;
  --on-canvas: #f6f0e6;
  --on-canvas-muted: #d9cbb8;
  --brass: #7a4e24;
  --brass-bright: #e8c9a0;
  --border: #8d6233;
  --rule: #e0d0b8;
  --danger: #8f2d24;
  --radius: 10px;
  --shadow: 0 28px 50px rgb(0 0 0 / 38%);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { font-size: 100%; }
html, body { margin: 0; min-height: 100%; }

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, #2a2118 0%, transparent 55%),
    var(--canvas);
  color: var(--text);
  font-family: "Golos Text", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
}
.nav :focus-visible,
.nav-extra :focus-visible {
  outline-color: var(--brass-bright);
}

.display {
  font-family: "Cormorant Garamond", "Golos Text", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

a.nav-btn, a.row, a.result, a.btn { color: inherit; text-decoration: none; }
a.btn { display: inline-flex; align-items: center; justify-content: center; }
a.link { color: var(--brass); text-decoration: underline; text-underline-offset: 3px; }

.app {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100dvh;
}

.nav { grid-column: 1; grid-row: 1; }
.nav-extra { grid-column: 1; grid-row: 2; align-self: end; padding: 0 0 1.5rem 0.75rem; }
.main { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }

.nav {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0 1rem 1rem;
  color: var(--on-canvas);
}

.mark {
  margin: 0 0.75rem 1.5rem;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--brass-bright);
}

.nav-label, .keys {
  margin: 1.25rem 0.75rem 0.25rem;
  color: var(--on-canvas-muted);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.nav-extra .keys { margin: 1rem 0.75rem 0.5rem; color: var(--on-canvas-muted); }

.nav-btn {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: transparent;
  color: var(--on-canvas);
  text-align: left;
  transition: background-color 120ms ease, color 120ms ease;
}

.nav-btn.sub { padding-left: 1.25rem; color: var(--on-canvas-muted); }
.nav-btn:hover { background: rgb(246 240 230 / 8%); }
.nav-btn[aria-current="page"] {
  color: var(--brass-bright);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brass-bright);
}
.nav-btn.done-link { margin-top: 1rem; }
.nav-extra .nav-btn { width: calc(100% - 0.75rem); color: var(--on-canvas-muted); }

.nav-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0.75rem 0 0;
}

.nav-form input,
.project-pick,
.search,
.composer input,
.login input,
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}

.nav-form input,
.project-pick,
.search,
.composer input,
.login input {
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
}

.nav-form input,
.nav-extra .btn {
  background: transparent;
  color: var(--on-canvas);
  border-color: #9a7b58;
}

.nav-form input::placeholder { color: var(--on-canvas-muted); opacity: 1; }

.main {
  margin: 1.25rem 1.25rem 1.25rem 0;
  background: var(--surface);
  border-radius: 16px;
  border-top: 4px solid var(--brass-bright);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 2.5rem);
}

.frame { display: flex; flex-direction: column; flex: 1; min-width: 0; }

.head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 2rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.kicker {
  margin: 0 0 0.15rem;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--brass);
}

h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(3rem, 2rem + 3vw, 4.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0.6rem 0 0;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.tools { display: flex; align-items: center; gap: 0.75rem; }
.search { width: 14rem; background: #fffaf3; }
.search::placeholder, .composer input::placeholder, .field textarea::placeholder, .login input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.btn {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  transition: background-color 120ms ease, transform 120ms ease;
}
.btn:hover { background: var(--surface-deep); }
.btn:active { transform: scale(0.98); }
.btn.primary {
  border-color: transparent;
  background: var(--brass);
  color: var(--on-canvas);
  font-weight: 600;
}
.btn.primary:hover { background: #633f1c; }
.btn[aria-pressed="true"] {
  background: var(--brass);
  color: var(--on-canvas);
  border-color: transparent;
}

.nav-extra .btn {
  background: transparent;
  color: var(--on-canvas);
  border-color: #c4a27a;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
  align-items: stretch;
  flex: 1;
}

.screen-done .workspace {
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
}

.list-col { min-width: 0; padding: 0.5rem 0.5rem 2rem; }

.group-label {
  margin: 1.25rem 1rem 0.35rem;
  color: var(--brass);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1;
}
.group-label:first-child { margin-top: 0.75rem; }

.empty { margin: 0.5rem 1rem 0; max-width: 36rem; }

.row, .result {
  display: flex;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.85rem 1rem;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  border-bottom: 1px solid var(--rule);
  transition: background-color 120ms ease;
}
.row { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.result { flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.75rem; }
.row:hover, .result:hover { background: #fbf6ee; }
.row[aria-current], .result[aria-current] {
  background: var(--surface-deep);
  box-shadow: inset 3px 0 0 var(--brass);
}
.name { font-size: 1rem; line-height: 1.35; }
.row[aria-current] .name, .result[aria-current] .result-text { font-weight: 600; }
.result-text { flex: 1 1 12rem; }
.when, .meta-line { color: var(--text-muted); font-size: 0.875rem; line-height: 1.35; }

.screen-done .result { padding: 1.1rem 1.25rem; }
.screen-done .result-text {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 1.2rem + 1vw, 2.15rem);
  line-height: 1.05;
  color: var(--text);
}
.screen-done .when {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--brass);
}

.composer { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.75rem 1rem; }

.pane {
  min-height: 100%;
  padding: 1.75rem 2rem 2.5rem;
  background:
    linear-gradient(180deg, rgb(232 201 160 / 35%), transparent 72px),
    #fbf7f0;
}
.screen-today .pane, .screen-project .pane { border-left: 1px solid var(--rule); }
.screen-done .pane { border-left: 1px solid var(--rule); }
.sheet { max-width: 40rem; }

.pane h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 1.4rem + 2vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.screen-today .pane h2 { font-size: clamp(2.8rem, 2rem + 2vw, 4rem); }

.pane .meta { margin: 0.45rem 0 0; color: var(--text-muted); }
.history-note {
  margin: 0.35rem 0 0;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--brass);
}

.field { display: block; margin-top: 1rem; }
.field span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.field textarea {
  display: block;
  min-height: 4.5rem;
  padding: 0.7rem 0.8rem;
  line-height: 1.5;
  resize: vertical;
  background: #fffaf3;
}
.field-now textarea { min-height: 7.5rem; }
.field-result { margin-top: 1.35rem; }
.field-result span {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--brass);
}
.save { margin-top: 1rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.pane .primary { margin-top: 1.5rem; }
.pane-empty { margin: 0; max-width: 24rem; color: var(--text-muted); font-size: 1.05rem; }

.danger {
  margin: 1.5rem 1rem 0;
  padding: 0.5rem 0;
  min-height: 2.75rem;
  border: 0;
  background: none;
  color: var(--danger);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pane .danger { margin-left: 0; }
.alert { margin: 0.5rem 0 0; color: var(--danger); }

.login-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.login {
  width: min(100%, 26rem);
  background: var(--surface);
  padding: 2.25rem 2rem 2rem;
  border-radius: 16px;
  border-top: 4px solid var(--brass-bright);
  box-shadow: var(--shadow);
}
.login h1 {
  font-size: clamp(3.2rem, 8vw, 4.2rem);
}
.login p { margin: 0.35rem 0 0; color: var(--text-muted); }
.login label { display: block; margin-top: 1rem; }
.login label span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.login .primary { margin-top: 1.5rem; width: 100%; }

@media (max-width: 860px) {
  .workspace, .screen-done .workspace { grid-template-columns: 1fr; }
  .pane, .screen-today .pane, .screen-project .pane, .screen-done .pane { border-left: 0; border-top: 1px solid var(--rule); }
}

@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .nav, .main, .nav-extra { grid-column: 1; }
  .nav { grid-row: 1; }
  .main { grid-row: 2; margin: 0.75rem; min-height: 0; }
  .nav-extra { grid-row: 3; padding: 0 0.75rem 1rem; }

  .nav {
    position: sticky;
    top: 0;
    z-index: 2;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.6rem 0.75rem;
    background: var(--canvas);
  }
  .mark, .nav-label, .keys { display: none; }
  .nav-btn, .nav-btn.sub, .nav-btn.done-link, .nav-extra .nav-btn {
    width: auto;
    margin: 0;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: none;
  }
  .nav-btn[aria-current="page"] { background: var(--brass); color: var(--on-canvas); }
  .nav-form { width: 100%; margin: 0 0 0.75rem; }
  .head { flex-direction: column; align-items: stretch; padding: 1.25rem 1rem 1rem; }
  h1 { font-size: clamp(2.6rem, 12vw, 3.4rem); }
  .tools { flex-direction: column; align-items: stretch; }
  .search, .tools .btn { width: 100%; }
  .list-col { padding-bottom: 1.5rem; }
  .pane { padding: 1.25rem 1rem 2rem; }
  .danger { margin-left: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .btn:active { transform: none; }
}
