/* Instrument-dark palette; amber is reserved for navigation and time. */
:root {
  color-scheme: dark;
  --paper: #121310;
  --text: #d7d5cb;
  --text-soft: #b0b1a5;
  --navy: #eeece0;
  --rule: #73512f;
  --link: #efab68;
  --link-visited: #cf9b6b;
  --accent: #ffad60;
  --muted: #999c8d;
  --hairline: #30332a;
  --code-bg: #191b16;
  --hover-bg: #22241d;
  --font-sans: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Noto Sans KR", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-small: 0.75rem;
  --font-body: 0.8125rem;
  --font-section: 0.8125rem;
  --font-heading: 0.9375rem;
  --font-code: 0.75rem;
  --font-list-title: 0.875rem;
  --font-reading: 0.875rem;
  --font-article-title: 1.25rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --page-width: 47.5rem;
  --page-gutter: var(--space-5);
  --control-height: 2.25rem;
  --radius: 0.1875rem;
  --field-border: #454a3b;
  --success: #b7d3be;
  --error: #f0b8ae;
  --section-border: #575343;
  --row-border: #3d4035;
  --row-padding: var(--space-4);
  --list-line-height: 1.65;
  --table-date-width: 6.25rem;
  --table-views-width: 3.5rem;
}

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

html {
  background: var(--paper);
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--font-body);
  line-height: 1.8;
}

a {
  color: var(--link);
}

a:visited {
  color: var(--link-visited);
}

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

.visuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

a { text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
::selection { background: #694626; color: #fff4df; }
button, input, select, textarea { font: inherit; }
button {
  min-height: var(--control-height);
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: #30271d; border-color: var(--link); }
button:active { background: #3b2e1f; }
button:disabled { opacity: 0.6; cursor: wait; }
label { display: flex; flex-direction: column; gap: 6px; }
label > span { color: var(--text-soft); font-size: var(--font-small); }
input, select, textarea {
  width: 100%;
  min-height: var(--control-height);
  padding: 6px 10px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: var(--link); }
textarea { resize: vertical; min-height: 112px; line-height: 1.8; }
@media (max-width: 540px) {
  input, select, textarea { font-size: 1rem; }
}

@media (pointer: coarse) {
  button, input, select { min-height: 44px; }
}
