:root {
  color-scheme: light;
  font-family: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172522;
  background: #f5f6f2;
  --surface: #fff;
  --canvas: #f5f6f2;
  --ink: #172522;
  --muted: #53645e;
  --line: #dce4df;
  --wash: #edf4ef;
  --accent: #175846;
  --danger: #9b3429;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
button, input, select { font: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid var(--line); border-radius: 9px; padding: .6rem .86rem; cursor: pointer;
  background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none;
}
button:hover, .button:hover { border-color: #a1b5a9; background: var(--wash); }
button:disabled { cursor: wait; opacity: .6; }
a { color: var(--accent); }
button.primary { background: var(--accent); color: white; border-color: var(--accent); }
button.primary:hover { background: #134738; }
button.subtle { background: transparent; border-color: transparent; color: var(--muted); }
button.subtle:hover { background: var(--wash); color: var(--ink); }
button.danger { color: var(--danger); }
:focus-visible { outline: 2px solid #087957; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { line-height: 1.09; letter-spacing: -.044em; font-size: clamp(2rem, 5vw, 3.15rem); }
h2 { line-height: 1.2; letter-spacing: -.025em; font-size: 1.24rem; }
p { line-height: 1.55; }
small, .muted { color: var(--muted); }
label { display: block; font-weight: 600; margin: 0 0 .4rem; }
input, select {
  width: 100%; padding: .72rem .78rem; color: var(--ink);
  background: var(--surface); border: 1px solid #c8d5ce; border-radius: 8px;
}
input[type=file] { padding: .6rem; }
input::file-selector-button { margin-inline-end: .6rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-size: .95rem; font-weight: 750; }
.brand-mark {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem;
  border-radius: 9px; background: #dcece1; color: var(--accent); font-size: 1.42rem;
}
.sign-in { display: grid; min-height: 100dvh; place-content: center; padding: 1.3rem; }
.entry-card {
  width: min(100%, 27rem); padding: clamp(1.4rem, 5vw, 2.45rem);
  border-radius: 18px; background: white; border: 1px solid var(--line);
  box-shadow: 0 15px 55px #163a2812;
}
.entry-card h1 { font-size: clamp(1.7rem, 5vw, 2.15rem); margin: 1.65rem 0 .6rem; }
.entry-card > p { color: var(--muted); }
.entry-card form { margin-top: 1.5rem; }
.entry-card button.primary { margin-top: .75rem; width: 100%; }
.notice { color: var(--muted); font-size: .88rem; }
.notice:not(:empty) { margin-top: .7rem; }
.notice.error { color: var(--danger); }
#pin, #code { letter-spacing: .25em; font-variant-numeric: tabular-nums; }
header {
  min-height: 64px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: .45rem 1.5rem; padding: .8rem 2rem; background: var(--surface);
  border-bottom: 1px solid var(--line);
}
header nav { display: flex; align-items: center; flex-wrap: wrap; gap: .28rem; }
header .current { color: var(--accent); background: var(--wash); }
.workspace { display: grid; grid-template-columns: 235px minmax(0, 1fr); min-height: calc(100dvh - 65px); }
aside { padding: 1.45rem .9rem; border-right: 1px solid var(--line); }
.aside-heading { align-items: center; display: flex; justify-content: space-between; padding: 0 .55rem .65rem; }
.tree { padding: 0; margin: 0; list-style-type: none; }
.tree .tree { padding-left: .65rem; }
.tree button { width: 100%; justify-content: start; overflow-wrap: anywhere; }
.tree button.active { background: #e1eee5; color: var(--accent); }
.content { width: min(100%, 79rem); padding: clamp(1.15rem, 4vw, 3rem); margin: 0 auto; }
.topline { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .65rem; overflow-wrap: anywhere; }
.action-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.list { margin: 1.5rem 0 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.list-head, .list-item {
  display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(6rem, .7fr) minmax(8rem, .7fr) auto;
  align-items: center; gap: .75rem; padding: .8rem 1rem;
}
.list-head { background: #f9faf8; font-size: .78rem; font-weight: 650; color: var(--muted); }
.list-item { border-top: 1px solid var(--line); }
.list-item > div { min-width: 0; }
.row-name { font-weight: 680; overflow-wrap: anywhere; }
.subline { display: block; font-size: .83rem; color: var(--muted); overflow-wrap: anywhere; }
.status { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.status.live { color: var(--accent); }
.empty { padding: 2.1rem 1.2rem; color: var(--muted); text-align: center; }
dialog {
  max-height: 90dvh; width: min(calc(100% - 2rem), 36rem); padding: 1.35rem;
  border-radius: 14px; border: 1px solid var(--line); color: var(--ink); box-shadow: 0 25px 80px #17252238;
}
dialog::backdrop { background: #17252255; }
.dialog-head { display: flex; justify-content: space-between; gap: .5rem; align-items: center; margin-bottom: .9rem; }
.dialog-head h2 { overflow-wrap: anywhere; }
.field { margin-bottom: .85rem; }
.card-section { border-top: 1px solid var(--line); padding: 1rem 0; }
.card-section h3 { margin-bottom: .65rem; font-size: .93rem; }
.card-section .action-row { margin-top: .65rem; }
.history { padding-left: 1.15rem; }
.history li { margin: .55rem 0; overflow-wrap: anywhere; }
.history li .button, .history li button { padding: .35rem .55rem; margin-left: .3rem; }
.aux-form { padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-top: 1rem; }
.aux-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; margin: 0; padding: .8rem 1rem;
  gap: .5rem; border-bottom: 1px solid var(--line);
}
.aux-row:last-child { border-bottom: 0; }
.aux-row > div { overflow-wrap: anywhere; }
.secret { margin: .85rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; padding: .7rem; background: var(--wash); }
.viewer { height: 100dvh; }
.viewer iframe { display: block; border: 0; width: 100%; height: 100%; }
@media (max-width: 720px) {
  header { padding: .7rem 1rem; }
  .workspace { display: block; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); padding: .55rem 1rem; }
  .tree > li { display: inline-block; vertical-align: top; max-width: 100%; }
  .tree .tree { padding-left: .4rem; }
  .list-head { display: none; }
  .list-item { grid-template-columns: minmax(0, 1fr) auto; }
  .list-item .row-date { display: none; }
  .list-item:first-child { border-top: 0; }
}
