/* Birthday Greetings
   A wall-calendar look: slate paper, a deep teal for anything you can press,
   and marigold kept for the calendar leaf and the brand mark only. */

:root {
  --ink: #1d2b3a;
  --muted: #53626f;
  --paper: #eef2f4;
  --surface: #ffffff;
  --line: #c9d3da;
  --teal: #0e5c63;
  --teal-deep: #093f44;
  --marigold: #e2a400;
  --good: #17603a;
  --good-bg: #e2f2e7;
  --bad: #9d241c;
  --bad-bg: #fbe8e6;
  --warn: #5b4200;
  --warn-bg: #fdf1cc;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 40rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--teal); text-underline-offset: 0.15em; }
a:hover { color: var(--teal-deep); }

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

.skip { position: absolute; left: -999rem; top: 0; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

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

[hidden] { display: none !important; }

/* ---------- headings and text ---------- */

h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.15; color: var(--ink); }
h1 { font-size: 2.25rem; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; margin: 0 0 0.6rem; }

p, ul, ol, dl { margin: 0 0 1rem; max-width: var(--measure); }
.lede { font-size: 1.125rem; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.35rem; }
.nowrap { white-space: nowrap; }
code { font-family: var(--mono); font-size: 0.9em; }
code.block {
  display: block; margin: 0.4rem 0; padding: 0.6rem 0.75rem; max-width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  overflow-wrap: anywhere; user-select: all;
}

main > section, main > h1 { margin-top: 2.25rem; }
main > section + section { padding-top: 2rem; border-top: 1px solid var(--line); }
main { padding-bottom: 3rem; }
.narrow { max-width: 30rem; }
.bare main > .narrow { margin-left: auto; margin-right: auto; margin-top: 3rem; }

/* ---------- top bar ---------- */

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }

.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 1.5rem; height: 1.6rem; border-radius: 3px; flex: none;
  background: linear-gradient(var(--marigold) 0 32%, var(--surface) 32%);
  border: 2px solid var(--teal);
}
.brand-text { font-family: var(--serif); font-size: 1.2rem; line-height: 1.1; }
.brand-text small { display: block; max-width: 15rem; margin-top: 0.15rem; font-family: var(--sans); font-size: 0.75rem; line-height: 1.25; color: var(--muted); }

.nav { display: flex; flex-wrap: wrap; gap: 0.1rem 0.25rem; flex: 1 1 auto; }
.nav a {
  padding: 0.45rem 0.5rem; border-radius: 4px; text-decoration: none; color: var(--ink); font-size: 0.95rem;
  border-bottom: 3px solid transparent;
}
.nav a:hover { background: var(--paper); }
.nav a[aria-current="page"] { border-bottom-color: var(--teal); border-radius: 4px 4px 0 0; font-weight: 600; }

.who { display: flex; align-items: center; gap: 0.8rem; font-size: 0.9rem; margin-left: auto; }
.who form { margin: 0; }
.who a[aria-current="page"] { font-weight: 600; }
button.link {
  background: none; border: 0; padding: 0; font: inherit; color: var(--teal);
  text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer;
}

.foot { color: var(--muted); font-size: 0.85rem; padding-top: 0; padding-bottom: 2rem; }

/* ---------- notices ---------- */

.note {
  max-width: none; margin: 1.25rem 0 0; padding: 0.75rem 1rem;
  border-left: 5px solid var(--teal); background: var(--surface); border-radius: 0 4px 4px 0;
}
.note-good { border-color: var(--good); background: var(--good-bg); }
.note-bad { border-color: var(--bad); background: var(--bad-bg); }
.note-warn { border-color: var(--marigold); background: var(--warn-bg); color: var(--warn); }
section .note { margin: 0 0 1rem; }

.tag {
  display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px;
  font-size: 0.85rem; background: var(--paper); border: 1px solid var(--line); white-space: nowrap;
}
.tag-good { background: var(--good-bg); border-color: #a9d3b8; color: var(--good); }
.tag-bad { background: var(--bad-bg); border-color: #e6b3ae; color: var(--bad); }
.tag-warn { background: var(--warn-bg); border-color: #e6cf85; color: var(--warn); }
.why { display: block; color: var(--bad); font-size: 0.9rem; margin-top: 0.2rem; }

/* ---------- today ---------- */

.today { display: grid; grid-template-columns: 11rem 1fr; gap: 2rem; align-items: start; }

/* The one decorative object on the site: a tear-off calendar leaf. */
.leaf {
  display: flex; flex-direction: column; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 1px 0 var(--line), 0 5px 0 -1px var(--surface), 0 5px 0 0 var(--line);
  overflow: hidden; text-align: center;
}
.leaf-month { width: 100%; background: var(--marigold); color: #2b2000; font-weight: 600; padding: 0.4rem 0.5rem; }
.leaf-day { font-family: var(--serif); font-size: 5.5rem; line-height: 1; padding: 0.9rem 0 0.2rem; font-variant-numeric: lining-nums; }
.leaf-week { color: var(--muted); padding-bottom: 0.9rem; }

.today-body h1 { margin-top: 0.4rem; }

.people { list-style: none; padding: 0; margin: 0 0 1.25rem; max-width: none; }
.people li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem;
  padding: 0.7rem 0; border-top: 1px solid var(--line);
}
.people li:last-child { border-bottom: 1px solid var(--line); }
.people .person { flex: 1 1 16rem; overflow-wrap: anywhere; }
.people .why { flex-basis: 100%; }

.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.inline-form .hint { margin: 0; }

.checks { max-width: none; margin: 0; }
.checks > div {
  display: grid; grid-template-columns: 1.6rem 10rem 1fr; gap: 0 0.5rem;
  padding: 0.7rem 0; border-top: 1px solid var(--line);
}
.checks > div::before { content: "✓"; color: var(--good); font-weight: 700; }
.checks > div.attn::before { content: "!"; color: var(--bad); text-align: center; }
.checks > div.attn { background: var(--warn-bg); margin: 0 -0.75rem; padding-left: 0.75rem; padding-right: 0.75rem; border-radius: 4px; }
.checks dt { font-weight: 600; }
.checks dd { margin: 0; }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; margin: 0 0 1rem; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); }
th, td { text-align: left; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-weight: 600; background: #f7f9fa; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td { overflow-wrap: anywhere; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.example { width: auto; min-width: 22rem; }

/* ---------- forms ---------- */

.form { max-width: 30rem; margin: 0 0 1.25rem; }
.form label { display: block; font-weight: 600; margin: 1rem 0 0.2rem; }
.form label.check { font-weight: 400; display: flex; gap: 0.5rem; align-items: center; }
.form .optional { font-weight: 400; color: var(--muted); }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="file"], select, textarea {
  display: block; width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid #8794a0; border-radius: 4px; padding: 0.55rem 0.65rem;
}
input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--teal); }
input[type="file"] { padding: 0.9rem 0.65rem; border-style: dashed; }
textarea { resize: vertical; }

.btn {
  display: inline-block; margin-top: 1.1rem; padding: 0.6rem 1.15rem; font: inherit; font-weight: 600;
  color: #fff; background: var(--teal); border: 2px solid var(--teal); border-radius: 4px;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
.btn-quiet { background: var(--surface); color: var(--teal); }
.btn-quiet:hover { background: var(--paper); color: var(--teal-deep); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: var(--bad); }
.btn-danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.inline-form .btn, .row-actions .btn, .result .btn { margin-top: 0; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-row { max-width: 36rem; display: grid; grid-template-columns: 1fr auto; gap: 0 0.75rem; align-items: end; }
.form-row label { grid-column: 1 / -1; }
.form-row .btn { margin-top: 0; }

details.advanced { margin: 1.25rem 0 0; padding: 0.6rem 0.9rem; border: 1px solid var(--line); border-radius: 4px; background: #f7f9fa; max-width: var(--measure); }
details summary { cursor: pointer; color: var(--teal); }
details.advanced[open] { padding-bottom: 1rem; }

.steps { padding-left: 1.4rem; }
.steps li { margin-bottom: 0.7rem; }
.plain { padding-left: 1.2rem; }

.toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.75rem 2rem; margin-bottom: 0.9rem; }
.field-inline { flex: 0 1 22rem; }
.field-inline label { display: block; font-weight: 600; margin-bottom: 0.2rem; }
.sorts { margin: 0; }

/* ---------- users ---------- */

.user-list { list-style: none; padding: 0; margin: 0; max-width: none; }
.user-list > li { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.user-list > li:last-child { border-bottom: 1px solid var(--line); }
.user-main .tag { margin-left: 0.4rem; }
.user-list details { margin-top: 0.4rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.25rem 0 0.5rem; }
.row-actions form { margin: 0; }

/* ---------- small screens ---------- */

@media (max-width: 44rem) {
  h1 { font-size: 1.85rem; }
  .today { grid-template-columns: 1fr; gap: 1.25rem; }
  .leaf { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 0.6rem; max-width: 100%; }
  .leaf-month { flex-basis: 100%; }
  .leaf-day { font-size: 3.25rem; padding: 0.5rem 0 0.6rem; }
  .leaf-week { padding-bottom: 0.6rem; }
  .checks > div { grid-template-columns: 1.6rem 1fr; }
  .checks dd { grid-column: 2; }
  .pair, .form-row { grid-template-columns: 1fr; }
  .form-row .btn { margin-top: 0.8rem; justify-self: start; }
  .who { margin-left: auto; }
}

@media print {
  .top, .foot, .btn, form { display: none; }
  body { background: #fff; }
}
