/* Stillframe site and dashboard. Colours and type come only from the theme's tokens
   (themes/daylight.css); this file decides layout. tools/check-theme.py keeps it that way. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 17px; line-height: 1.6; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
code, pre, kbd { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--card); border: 1px solid var(--border); border-radius: 4px; padding: 0.05em 0.35em; word-break: break-word; }
/* A sample wider than the box scrolls, and shows it: a soft edge on whichever side has more to read. */
pre { background-color: var(--card);
  background-image: linear-gradient(to right, var(--card), var(--card)), linear-gradient(to left, var(--card), var(--card)),
    linear-gradient(to right, color-mix(in srgb, var(--fg) 22%, transparent), transparent), linear-gradient(to left, color-mix(in srgb, var(--fg) 22%, transparent), transparent);
  background-position: left center, right center, left center, right center; background-repeat: no-repeat;
  background-size: 1.5rem 100%, 1.5rem 100%, 0.9rem 100%, 0.9rem 100%; background-attachment: local, local, scroll, scroll;
  border: 1px solid var(--border); border-radius: 6px; padding: 0.9rem 1rem; overflow-x: auto; line-height: 1.45; }
pre:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
pre code { background: none; border: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; color: var(--fg); }
h1 { font-size: 2.4rem; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; font-family: var(--font); font-weight: 650; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
.muted { color: var(--fg-muted); }
.lede { font-size: 1.2rem; color: var(--fg-secondary); max-width: 38rem; }

/* frame */
.top { border-bottom: 1px solid var(--border); background: var(--bg); }
.top .in { max-width: 64rem; margin: 0 auto; padding: 0.85rem 1rem; display: flex; align-items: baseline; gap: 1.5rem; flex-wrap: wrap; }
.brand { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--fg); text-decoration: none; }
.top nav { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.95rem; }
.top nav a { color: var(--fg-secondary); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--fg); text-decoration: underline; }
main { max-width: 64rem; margin: 0 auto; padding: 2.5rem 1rem 4rem; }
main.narrow { max-width: 44rem; }
.foot { border-top: 1px solid var(--border); color: var(--fg-muted); font-size: 0.9rem; }
.foot .in { max-width: 64rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.foot a { color: var(--fg-muted); }

/* home */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; margin-bottom: 1rem; }
.hero figure { margin: 0; }
.hero.solo { grid-template-columns: 1fr; }
.hero img { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: 6px; background: var(--card); }
.hero figcaption { font-size: 0.85rem; color: var(--fg-muted); margin-top: 0.4rem; }
.address { font-family: var(--mono); font-size: 0.95rem; background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 0.6rem 0.8rem; display: inline-block; margin: 0.25rem 0 1rem; word-break: break-all; }
.uses { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.uses li { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.1rem; margin: 0; }
.uses b { display: block; margin-bottom: 0.25rem; }
.uses span { color: var(--fg-secondary); font-size: 0.95rem; }
.guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1.25rem; align-items: start; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.guides li { margin: 0; }
.guides a { display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; color: var(--fg); text-decoration: none; }
.guides a:hover { border-color: var(--primary); }
.guides img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-bottom: 1px solid var(--border); }
.guides .t { display: grid; gap: 0.3rem; padding: 1rem 1.1rem 1.2rem; }
.guides b { font-family: var(--font-display); font-size: 1.15rem; }
.guides .t span { color: var(--fg-secondary); font-size: 0.95rem; }
.shot { margin: 1.75rem 0 2.5rem; }
.shot img { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.shot figcaption { font-size: 0.9rem; color: var(--fg-muted); margin-top: 0.6rem; }
.shot .address { display: block; margin: 0 0 0.35rem; }
.guide h2 { margin-top: 2.25rem; }
.guide > :not(.shot) { max-width: 44rem; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; padding-left: 2.2rem; position: relative; margin-bottom: 0.9rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0.05rem; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--primary-dim); color: var(--primary); font-weight: 700; font-size: 0.85rem; display: grid; place-items: center; }
.button { display: inline-block; background: var(--primary); color: var(--card); border: 1px solid var(--primary); border-radius: 6px;
  padding: 0.55rem 1.1rem; text-decoration: none; font-weight: 600; font-size: 0.95rem; cursor: pointer; font-family: var(--font); }
.button:hover { text-decoration: none; filter: brightness(0.95); }
.button.quiet { background: var(--card); color: var(--fg); border-color: var(--border); }
.button.danger { background: var(--card); color: var(--red); border-color: var(--border); }
.button:disabled { opacity: 0.55; cursor: default; }

/* tables */
table { border-collapse: collapse; width: 100%; margin: 0 0 1.25rem; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.55rem 0.75rem 0.55rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; color: var(--fg-secondary); font-size: 0.85rem; }
.tablewrap { overflow-x: auto; }

/* forms */
label { display: block; font-size: 0.85rem; color: var(--fg-secondary); margin: 0 0 0.25rem; }
input, select { font: inherit; font-size: 0.95rem; color: var(--fg); background: var(--card); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.5rem 0.6rem; width: 100%; }
input:focus, select:focus, .button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
input[type="color"] { padding: 0.15rem; height: 2.4rem; }
input[type="file"] { padding: 0.35rem; }
.field { margin-bottom: 0.9rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0 1rem; }
.note { font-size: 0.85rem; color: var(--fg-muted); margin-top: 0.25rem; }
.error { color: var(--red); }
.good { color: var(--green); }
.warn { color: var(--yellow); }

/* dashboard */
.bar { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.bar h1 { margin: 0; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.feeds { display: grid; gap: 1rem; }
.feed { background: var(--card); border: 1px solid var(--border); border-radius: 8px; display: grid; grid-template-columns: 15rem 1fr; gap: 1.25rem; padding: 1rem; }
.feed .thumb { width: 15rem; aspect-ratio: 16 / 9; object-fit: contain; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; display: block; }
.feed h3 { margin: 0 0 0.25rem; }
.feed .meta { font-size: 0.9rem; color: var(--fg-secondary); margin-bottom: 0.6rem; }
.feed .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
.feed .actions .button { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.copy { display: flex; gap: 0.5rem; align-items: stretch; }
.copy input { font-family: var(--mono); font-size: 0.8rem; }
.status { font-weight: 600; font-size: 0.85rem; }
.flash { padding: 0.6rem 0.9rem; border-radius: 6px; border: 1px solid var(--border); background: var(--card); margin-bottom: 1rem; }
details summary { cursor: pointer; color: var(--fg-secondary); font-size: 0.9rem; }
details[open] summary { margin-bottom: 0.75rem; }

@media (max-width: 760px) {
  h1 { font-size: 1.9rem; }
  .hero { grid-template-columns: 1fr; }
  .feed { grid-template-columns: 1fr; }
  .feed .thumb { width: 100%; }
}
.docnav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; font-size: 0.9rem; padding-bottom: 0.75rem; margin: 0 0 1.25rem; border-bottom: 1px solid var(--border); }
.docnav a { color: var(--fg-secondary); }

/* The paste-an-address try-out on the home page (stillframe/site.py tryout_values). */
.tryout { margin: 2rem 0; }
.tryout form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.75rem 0; }
.tryout label { flex-basis: 100%; font-size: 0.9rem; color: var(--fg-secondary); }
.tryout input[type="url"] { flex: 1 1 18rem; min-width: 0; }
.tryout #tryout-out img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 6px; margin: 0.5rem 0; }
