:root {
  color-scheme: light;
  --ink: #172c2b;
  --muted: #65736f;
  --paper: #f7f5ef;
  --card: #fffdf8;
  --line: #dcded6;
  --green: #1f6257;
  --green-soft: #dcebe5;
  --amber: #c17837;
  --danger: #a34c42;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% 0%, #e7eee6 0, transparent 34rem), var(--paper); }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(24px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid rgba(23, 44, 43, .1); background: rgba(247, 245, 239, .82); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: white; font: 700 18px Georgia, serif; }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -.02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }

main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 80px; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: end; }
.eyebrow { margin: 0 0 9px; color: var(--amber); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
h1 { max-width: 680px; margin: 0; font: 500 clamp(38px, 6vw, 66px)/1.02 Georgia, serif; letter-spacing: -.045em; }
.hero-copy { max-width: 570px; margin: 18px 0 0; color: var(--muted); line-height: 1.65; }
.summary { display: grid; grid-template-columns: repeat(3, 110px); border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 253, 248, .8); overflow: hidden; }
.summary article { padding: 20px; text-align: center; }
.summary article + article { border-left: 1px solid var(--line); }
.summary span, .summary small { display: block; }
.summary span { font: 500 28px Georgia, serif; }
.summary small { margin-top: 5px; color: var(--muted); font-size: 11px; }

.toolbar { display: grid; grid-template-columns: minmax(250px, 1fr) auto minmax(150px, auto); gap: 12px; margin: 46px 0 20px; }
.search-field { display: flex; align-items: center; gap: 9px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.search-field span { color: var(--muted); font-size: 22px; }
.search-field input { width: 100%; min-height: 44px; border: 0; outline: 0; background: transparent; color: var(--ink); }
.status-tabs { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.status-tabs button { border: 0; border-radius: 8px; padding: 0 13px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.status-tabs button.active { background: var(--ink); color: white; }
.tag-filter select { min-height: 46px; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 0 36px 0 13px; background: var(--card); color: var(--ink); }
.notice { min-height: 22px; margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.notice[data-tone="success"] { color: var(--green); }
.notice[data-tone="error"] { color: var(--danger); }

.action-list { display: grid; gap: 11px; }
.action-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 21px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 5px 22px rgba(38, 55, 51, .035); transition: border-color .2s, transform .2s; }
.action-card:hover { border-color: #afb9b2; transform: translateY(-1px); }
.action-card.done { opacity: .62; }
.action-card.done h2 { text-decoration: line-through; text-decoration-thickness: 1px; }
.status-toggle { width: 25px; height: 25px; display: grid; place-items: center; margin-top: 1px; border: 1.5px solid #9eaaa4; border-radius: 8px; background: white; color: white; font-weight: 800; }
.done .status-toggle { border-color: var(--green); background: var(--green); }
.action-heading { display: flex; align-items: baseline; gap: 10px; }
.action-id { color: var(--amber); font: 700 11px ui-monospace, monospace; }
.action-heading h2 { margin: 0; font-size: 16px; line-height: 1.4; }
.action-description { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.tag { border: 0; border-radius: 999px; padding: 5px 8px; background: var(--green-soft); color: #28584f; font-size: 10px; font-weight: 700; }
.action-card footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding-top: 13px; border-top: 1px solid #ecece6; color: var(--muted); font-size: 10px; }
.source-link { color: var(--green); font-weight: 700; text-decoration: none; }

.loading-state, .empty-state { min-height: 290px; display: grid; place-items: center; align-content: center; gap: 10px; border: 1px dashed #c7cbc4; border-radius: 18px; color: var(--muted); text-align: center; }
.empty-state > span { font: 40px Georgia, serif; color: var(--amber); }
.empty-state h2, .empty-state p { margin: 0; }
.empty-state h2 { color: var(--ink); font: 500 23px Georgia, serif; }
.empty-state p { max-width: 360px; font-size: 13px; line-height: 1.5; }
.empty-state .button { margin-top: 8px; }
.spinner { width: 25px; height: 25px; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.button { min-height: 42px; border: 0; border-radius: 10px; padding: 0 17px; font-weight: 750; }
.button.primary { background: var(--ink); color: white; }
.button.secondary { border: 1px solid var(--line); background: white; color: var(--ink); }
.button.compact { min-height: 38px; font-size: 12px; }
.button:disabled { cursor: wait; opacity: .6; }

dialog { width: min(520px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 20px; padding: 0; background: var(--card); color: var(--ink); box-shadow: 0 28px 90px rgba(12, 34, 31, .25); }
dialog::backdrop { background: rgba(15, 31, 29, .48); backdrop-filter: blur(3px); }
dialog form { display: grid; gap: 17px; padding: 24px; }
.dialog-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.dialog-header h2 { margin: 0; font: 500 29px Georgia, serif; }
.dialog-copy { margin: -5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.icon-button { width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--muted); font-size: 22px; }
dialog label { display: grid; gap: 7px; color: #4f5d59; font-size: 12px; font-weight: 750; }
dialog input, dialog textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: white; color: var(--ink); outline: none; resize: vertical; }
dialog input:focus, dialog textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 98, 87, .1); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 3px; }

@media (max-width: 760px) {
  .site-header { height: 68px; padding: 0 18px; }
  main { width: min(100% - 28px, 620px); padding-top: 34px; }
  .hero { grid-template-columns: 1fr; gap: 26px; }
  .summary { grid-template-columns: repeat(3, 1fr); }
  .summary article { padding: 16px 8px; }
  .toolbar { grid-template-columns: 1fr; margin-top: 34px; }
  .status-tabs button { min-height: 38px; flex: 1; }
  .action-card { padding: 18px 16px; }
  .action-card footer { align-items: flex-start; flex-direction: column; gap: 7px; }
  h1 { font-size: 43px; }
}
