@font-face {
  font-family: "EB Garamond";
  src: url("eb-garamond.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Roboto;
  src: url("roboto.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Roboto;
  src: url("roboto-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #111111;
  --forest: #2b6409;
  --deep: #21361c;
  --river: #145575;
  --sage: #b1c5a4;
  --paper: #f9f9f9;
  --pale: #e7ede2;
  --white: #ffffff;
  --muted: #454d40;
  --line: #c1c9bc;
  --control-line: #687660;
  --serif: "EB Garamond", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 Roboto, system-ui, sans-serif; }
input, select, textarea, button { font: inherit; }
a { color: var(--forest); text-underline-offset: .2em; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--river); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); color: var(--deep); font-weight: 400; line-height: 1; }
h1 { font-size: clamp(3.25rem, 7vw, 5.8rem); letter-spacing: -.045em; }
h2 { font-size: clamp(2.15rem, 4vw, 3.2rem); letter-spacing: -.03em; }
h3 { font-size: clamp(1.75rem, 3vw, 2.4rem); letter-spacing: -.02em; }

.frame { width: min(100% - clamp(2rem, 9vw, 7rem), 66rem); margin-inline: auto; }
.skip { position: absolute; z-index: 2; top: .5rem; left: .5rem; padding: .65rem; background: var(--white); transform: translateY(-175%); }
.skip:focus { transform: translateY(0); }
.site-header { background: linear-gradient(180deg, var(--sage), var(--paper) 96%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .45rem 1rem; padding-block: .85rem; min-height: 5rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: #241e7d; font: 1.25rem/1 var(--serif); }
.brand img { display: block; width: 3rem; height: auto; flex: 0 0 auto; }
nav { display: flex; gap: .2rem 1.2rem; flex-wrap: wrap; }
nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink); font-size: .935rem; font-weight: 700; }

.opening { padding-top: clamp(1.7rem, 4vw, 3.6rem); }
.opening-copy { display: grid; align-items: end; grid-template-columns: 1.1fr 1fr; gap: 1rem 3rem; margin-bottom: 1.35rem; }
.opening-copy > p { color: var(--muted); max-width: 47ch; font-size: 1.08rem; }
.eyebrow { color: var(--forest); font-size: .875rem; font-weight: 700; letter-spacing: .105em; text-transform: uppercase; margin-bottom: .5rem; }
.road { display: block; width: 100%; height: clamp(6.5rem, 16vw, 12rem); object-fit: cover; object-position: 43% 83%; border: 3px solid var(--ink); }

.workspace { padding-block: clamp(2.2rem, 5vw, 4rem); }
.month-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: .7rem 1rem; margin-bottom: 1rem; }
.month-controls { display: flex; flex-wrap: wrap; gap: .45rem; }
button { min-height: 2.75rem; padding: .55rem .85rem; font-size: .95rem; line-height: 1.2; font-weight: 700; border-radius: .2rem; }
.primary { color: var(--white); background: var(--forest); border: 1px solid var(--forest); }
.primary:hover { background: var(--deep); }
.secondary { color: var(--deep); background: var(--white); border: 1px solid var(--control-line); }
.secondary:hover:not(:disabled) { background: var(--pale); }
button:disabled { opacity: .62; cursor: default; }
.text-button { color: var(--forest); background: transparent; border: 1px solid transparent; text-decoration: underline; text-underline-offset: .2em; }

.practice-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(.85rem, 2.5vw, 1.55rem); align-items: start; }
.practice-column { display: grid; gap: clamp(.85rem, 2.5vw, 1.55rem); }
.card { min-width: 0; border: 1px solid var(--line); border-top: .23rem solid var(--forest); background: var(--white); padding: clamp(1rem, 3.2vw, 1.8rem); }
.card h3 { margin-bottom: .75rem; }
label { display: block; font-weight: 700; margin-block: .7rem .3rem; }
select, textarea, input[type="text"], input[type="date"] { display: block; width: 100%; min-width: 0; min-height: 2.75rem; padding: .4rem .6rem; border: 1px solid var(--control-line); border-radius: .2rem; color: var(--ink); background: var(--white); }
select { appearance: none; padding-right: 1.8rem; background: linear-gradient(45deg, transparent 50%, var(--deep) 50%) calc(100% - 13px) 53% / 6px 6px no-repeat, linear-gradient(135deg, var(--deep) 50%, transparent 50%) calc(100% - 7px) 53% / 6px 6px no-repeat, var(--white); }
textarea { min-height: 8rem; resize: vertical; }
input:disabled { background: var(--paper); opacity: .7; }
.hint, .date-practice, .save-status { color: var(--muted); font-size: .95rem; }
#practice-hint, #practice-form button { margin-top: .7rem; }
.date-rows { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .75rem; }
.date-controls { display: flex; flex-wrap: wrap; gap: .4rem; }
.date-controls input { flex: 1 1 8.5rem; width: auto; }
.date-practice { margin-top: .3rem; overflow-wrap: anywhere; }
.save-status:not(:empty) { margin-top: .45rem; }
.reflection { background: var(--pale); }
.reflection label { max-width: 33ch; }
.companion { border-top: 1px solid var(--control-line); padding-top: .7rem; margin-top: 1rem; color: var(--deep); }

.history { border-top: 1px solid var(--line); padding-top: 1.4rem; margin-top: 2rem; }
.history h2 { margin-bottom: .55rem; }
.history p { color: var(--muted); }
.history ul { display: grid; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.history button { display: flex; flex-wrap: wrap; text-align: left; gap: .25rem .9rem; align-items: baseline; justify-content: space-between; width: 100%; border-color: var(--line); }
.history button span { color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.storage-note { color: var(--muted); margin-top: 1.65rem; font-size: .925rem; }
footer { background: var(--pale); padding-block: 1rem; font-weight: 700; }

@media (max-width: 47rem) {
  .opening-copy { grid-template-columns: 1fr; }
  .practice-layout { grid-template-columns: 1fr; }
}
@media (max-width: 30rem) {
  .header-inner { align-items: flex-start; flex-direction: column; }
  .date-rows { grid-template-columns: 1fr; }
}
