@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fraunces-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Fraunces;
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/fraunces-latin-500-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f3ecdf;
  --ink: #241c16;
  --rule: #ddcfc0;
  --brass: #6b3f22;
  --brass-bright: #b57a3a;
  --rail: #4a332b;
  --sheet: #fffcf7;
  --muted: #6a645a;
  --quiet: #8a8175;
  --ok: #1e6b3f;
  --fail: #8b2e2e;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --serif: Fraunces, "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161310;
    --ink: #f3ecdf;
    --rule: #3c342c;
    --brass: #e2b07a;
    --brass-bright: #e2b07a;
    --rail: #2a201c;
    --sheet: #211c18;
    --muted: #cbbbaa;
    --quiet: #b3a496;
    --ok: #8dcea8;
    --fail: #f0a8a0;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}

::selection {
  background: #e2b07a;
  color: #241c16;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

a {
  color: inherit;
}

a:visited {
  color: inherit;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.6rem;
  z-index: 5;
  padding: 0.45rem 0.7rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  transform: translateY(-160%);
}

.skip:focus {
  transform: none;
}

.ws-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--paper);
  border-top: 3px solid var(--brass-bright);
  border-bottom: 1px solid var(--rule);
}

.ws-bar {
  width: min(72rem, calc(100% - 1.5rem));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.mark {
  display: block;
  flex: none;
}

.mark .board { fill: #4a332b; }
.mark .key { fill: #e2b07a; }

@media (prefers-color-scheme: dark) {
  .mark .board { fill: #e7d7c4; }
}

.ws-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

.site-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.site-link:hover,
.site-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

.ws {
  width: min(72rem, calc(100% - 1.5rem));
  margin-inline: auto;
  padding: 1.25rem 0 3rem;
  display: grid;
  gap: 1.25rem;
}

.clock-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "face caption"
    "face meta";
  column-gap: 0.9rem;
  align-items: center;
}

.clock-face {
  grid-area: face;
  display: block;
  width: 84px;
  height: 84px;
  filter: drop-shadow(0 1px 2px rgba(26, 24, 20, 0.16));
}

.clock-meta {
  grid-area: meta;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
}

.clock-time {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.clock-date,
.clock-tz,
.clock-caption {
  display: block;
}

.clock-tz,
.clock-caption {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.clock-caption {
  grid-area: caption;
  margin: 0;
}

.sheet {
  background: var(--sheet);
  border: 1px solid var(--rule);
  padding: 1.35rem 1.15rem 1.2rem;
}

.who {
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.who::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 3px;
  margin-top: 0.75rem;
  background: var(--brass-bright);
}

.brief p {
  margin: 0 0 0.85em;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.brief p:last-child {
  margin-bottom: 0;
}

.bar {
  display: flex;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}

.bar input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  font: 16px/1.35 var(--sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.7rem 0.85rem;
}

.bar input:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  border-color: var(--ink);
}

.bar button,
.dogfood-form button {
  min-height: 48px;
  font: 600 1rem/1 var(--sans);
  cursor: pointer;
}

.bar button {
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.7rem 1.05rem;
  white-space: nowrap;
}

.bar button:hover,
.bar button:focus-visible {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--paper);
}

@media (prefers-color-scheme: dark) {
  .bar button:hover,
  .bar button:focus-visible,
  .dogfood-form button.save:hover,
  .dogfood-form button.save:focus-visible {
    color: #241c16;
  }
}

.bar button:disabled {
  background: transparent;
  border-color: var(--rule);
  color: var(--muted);
  cursor: not-allowed;
}

.ask-status {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  margin: 0.75rem 0 0;
}

.ask-status:empty {
  display: none;
}

.ask-status.replied {
  color: var(--ok);
}

.ask-status.failed {
  color: var(--fail);
}

.quiet-truth {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.turns {
  margin-top: 0.25rem;
}

.turn {
  margin-top: 1rem;
}

.turn.mine .said {
  margin: 0;
}

.turn .state {
  margin: 0.25rem 0 0;
  font-family: var(--serif);
  font-style: italic;
}

.turn .hint {
  margin: 0.25rem 0 0;
  color: var(--fail);
  font-size: 0.9rem;
}

.turn.hers {
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
}

.turn.hers .said {
  font-size: 1.0625rem;
  line-height: 1.5;
}

.turn.hers .said p {
  margin: 0 0 0.6em;
}

.turn.hers .said p:last-child {
  margin-bottom: 0;
}

.turn.hers .context,
.load-note {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dogfood {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.dogfood summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.dogfood .body {
  margin-top: 0.35rem;
}

.dogfood p {
  margin: 0 0 0.5rem;
}

.dogfood .label {
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
}

.dogfood-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.dogfood-form input {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 48px;
  font: 16px/1.3 var(--sans);
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
}

.dogfood-form button.save {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.65rem 0.9rem;
}

.dogfood-form button.clear {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 0.65rem 0.9rem;
}

.token-status {
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
  min-height: 1.2em;
}

.org {
  border-top: 1px solid var(--ink);
  padding-top: 0.85rem;
}

.org h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.org-summary {
  margin: 0.55rem 0 0;
  max-width: 36rem;
}

.org-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}

.org-role {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1rem;
  align-items: center;
  padding: 0.8rem 0;
  border-top: 1px solid var(--rule);
}

.org-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.org-role-name {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.org-status {
  grid-column: 2;
  grid-row: 1;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.org-role:has(.org-role-name) .org-status {
  grid-row: 1 / span 2;
}

.status-watching .org-status {
  color: var(--brass);
}

.status-working .org-status {
  color: var(--ok);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 520px) {
  .bar {
    flex-direction: column;
  }

  .bar button {
    width: 100%;
  }
}

@media (min-width: 800px) {
  .ws {
    grid-template-columns: 11rem minmax(0, 1fr);
    align-items: start;
  }

  .org {
    grid-column: 1 / -1;
    border-top: 0;
    padding-top: 0;
  }

  .clock-panel {
    position: sticky;
    top: 5.25rem;
    grid-template-columns: 1fr;
    grid-template-areas:
      "face"
      "caption"
      "meta";
    row-gap: 0.35rem;
  }

  .clock-face {
    width: 112px;
    height: 112px;
  }

  .sheet {
    padding: 1.75rem 1.6rem 1.4rem;
  }
}

@media (min-width: 1080px) {
  .ws {
    grid-template-columns: 11rem minmax(0, 1fr) 17.5rem;
  }

  .org {
    grid-column: auto;
    position: sticky;
    top: 5.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clock-face {
    filter: none;
  }
}
