/* Tag pages (tap, claim, profile, owner, home, admin): the Filet Foundry look (~/Projects/FiletFoundry/DESIGN.md).
   Fresh white ground, foundry-blue ink, forge orange for fills only, sprout green for links and the low-impact notes.
   Contrast on --ground: ink 15:1, muted 6.5:1, leaf (green text) 5.5:1, forge-ink 5:1 (WCAG AA). --sprout (3.9:1) is
   for icons and fills only, never text. Square corners (brand). */
@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/BricolageGrotesque[opsz,wdth,wght].ttf") format("truetype");
  font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }

:root {
  --ground: #F4F7F3; --paper: #FFFFFF; --ink: #0F1E46; --muted: #4B5878; --line: rgb(15 30 70 / .14); --line-hi: rgb(15 30 70 / .32);
  --forge: #F26A1B; --forge-ink: #B4470C; --sprout: #1E8A4E; --leaf: #187240; --sprout-bg: #E3F1E8; --bad: #B3261E; --ok: #1E8A4E;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 17px/1.5 var(--font); font-optical-sizing: auto; }
a { color: var(--leaf); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--forge); outline-offset: 3px; }
img { max-width: 100%; display: block; }

.page { max-width: 480px; margin: 0 auto; padding: 0 16px; min-height: 100svh; display: flex; flex-direction: column; }
.page.wide { max-width: 1080px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand small { font-weight: 500; color: var(--muted); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
main { flex: 1; padding: 18px 0 32px; }

h1, h2, h3 { margin: 0; line-height: 1.02; letter-spacing: -.025em; font-weight: 750; font-stretch: 90%; }
h1 { font-size: clamp(34px, 10vw, 46px); }
h2 { font-size: 24px; letter-spacing: -.02em; }
h3 { font-size: 19px; letter-spacing: -.01em; }
p { margin: 10px 0; }
.lede { font-size: 19px; color: var(--muted); margin: 12px 0 22px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--leaf); background: var(--sprout-bg); padding: 6px 10px; margin-bottom: 14px; }
.eyebrow svg { width: 15px; height: 15px; }

.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; padding: 0 20px;
  font: 650 17px/1.1 var(--font); text-decoration: none; cursor: pointer; border: 2px solid var(--ink); background: transparent; color: var(--ink);
  position: relative; overflow: hidden; isolation: isolate; transition: color .15s; }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--forge); transform: translateY(100%); transition: transform .25s steps(5); z-index: -1; }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn:hover, .btn:focus-visible { color: var(--ink); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover, .btn.primary:focus-visible { color: var(--ink); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:disabled::before { display: none; }
.stack { display: grid; gap: 12px; }

.card { background: var(--paper); border: 1px solid var(--line); padding: 20px; margin: 22px 0; }
.card > h2:first-child, .card > h3:first-child { margin-bottom: 6px; }

label { display: block; font-size: 15px; font-weight: 600; margin: 16px 0 6px; }
label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=url], input[type=password], textarea, select {
  width: 100%; font: 17px/1.3 var(--font); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-hi); border-radius: 0; padding: 13px 12px; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgb(242 106 27 / .35); }
textarea { min-height: 88px; resize: vertical; }
.hint { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 15px; margin: 18px 0 4px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--ink); }
.modes { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.modes legend { padding: 0; font-weight: 600; font-size: 15px; }
.modes .check { margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { font: 600 15px var(--font); min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line-hi); background: var(--paper); color: var(--ink); cursor: pointer; }
.chips button[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
form .btn { margin-top: 20px; }
.msg { min-height: 1.4em; font-size: 15px; margin: 10px 0 0; }
.msg.bad { color: var(--bad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy { font-size: 13px; color: var(--muted); margin-top: 14px; }

.done { text-align: left; }
.done .tick { width: 56px; height: 56px; display: grid; place-items: center; background: var(--sprout); color: #fff; margin-bottom: 16px; }
.done .tick svg { width: 30px; height: 30px; }

.eco { display: grid; gap: 10px; border-top: 1px solid var(--line); padding: 18px 0 8px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.eco li { display: flex; gap: 10px; align-items: flex-start; }
.eco svg { width: 18px; height: 18px; flex: none; color: var(--sprout); margin-top: 2px; }
.eco ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer.foot { font-size: 13px; color: var(--muted); padding: 10px 0 26px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
footer.foot a { color: var(--muted); }

/* tap page */
.bar { height: 4px; background: var(--line); overflow: hidden; margin: 6px 0 22px; }
.bar i { display: block; height: 100%; width: 0; background: var(--forge); }
.badge { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.badge svg { width: 16px; height: 16px; color: var(--sprout); }
.textbtn { background: none; border: 0; padding: 0; min-height: 44px; font: 650 17px var(--font); color: var(--leaf); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* profile */
.who { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.avatar { width: 84px; height: 84px; flex: none; background: var(--ink); color: #fff; display: grid; place-items: center; font: 750 30px var(--font); object-fit: cover; }
.who h1 { font-size: clamp(30px, 9vw, 40px); }
.who p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.met { display: flex; gap: 10px; align-items: center; background: var(--sprout-bg); color: var(--ink); padding: 10px 12px; font-size: 15px; margin: 4px 0 18px; }
.met svg { width: 18px; height: 18px; color: var(--sprout); flex: none; }
.links { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.links a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 56px; }
.links a span { display: grid; }
.links a b { font-weight: 650; }
.links a small { color: var(--muted); font-size: 14px; }
.links a:hover b { color: var(--forge-ink); }
.links svg { width: 18px; height: 18px; flex: none; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .btn::before { transition: none; } }
