/* Pallabs Field Guide: studio pinboard. Castoro (display, OFL) + Gantari (text, OFL), self-hosted. */
@font-face { font-family: "Castoro"; src: url("/s/fonts/castoro-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Castoro"; src: url("/s/fonts/castoro-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Gantari"; src: url("/s/fonts/gantari-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gantari"; src: url("/s/fonts/gantari-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Gantari"; src: url("/s/fonts/gantari-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --paper: #f3ecde; --card: #fbf7ef; --ink: #202430; --soft: #575a63; --line: #d9cfbb;
  --clay: #b44c2c; --moss: #3a5c4a; --ochre: #e2b048; --sky: #6f8fc0; --clay-bg: #f6dccf; --moss-bg: #d9e6dc; --ochre-bg: #f5e6c0; --sky-bg: #dde5f2;
  --display: "Castoro", "Iowan Old Style", Georgia, serif;
  --text: "Gantari", "Segoe UI", system-ui, sans-serif;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #191c24; --card: #222631; --ink: #ede6d6; --soft: #b5b0a5; --line: #383d4a;
    --clay: #ec8a64; --moss: #8cbb9f; --ochre: #e7c070; --sky: #9db7e0; --clay-bg: #3b2a25; --moss-bg: #22332b; --ochre-bg: #3a3222; --sky-bg: #262f40; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--text); overflow-x: hidden;
  background-image: radial-gradient(color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 1px); background-size: 22px 22px; }
a { color: var(--clay); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
img, svg { max-width: 100%; height: auto; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); margin: .2em 0 .35em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin: 1.8em 0 .4em; }
h3 { font-size: 1.3rem; margin: 1.4em 0 .3em; }

/* masthead */
.masthead { border-bottom: 2px solid var(--ink); background: var(--paper); }
.mast-in { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .6rem 1.5rem; padding: 1.1rem 0 0; }
.mark { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .65rem; text-decoration: none; color: var(--ink); padding-bottom: .8rem; }
.dots { grid-row: 1 / 3; display: flex; align-items: center; }
.dots i { width: 22px; height: 22px; border-radius: 50%; display: block; background: var(--clay); }
.dots i + i { background: transparent; border: 4px solid var(--moss); margin-left: -8px; }
.word { font: italic 400 1.9rem/1 var(--display); letter-spacing: -.02em; }
.sub { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--soft); font-weight: 600; }
.tabs { display: flex; flex-wrap: wrap; gap: .2rem; }
.tabs a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; padding: .5rem .8rem .55rem; border: 2px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; margin-bottom: -2px; }
.tabs a:hover { background: var(--card); }
.tabs a[aria-current] { background: var(--card); border-color: var(--ink); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: 1rem auto 0; font-size: .88rem; color: var(--soft); }
.crumbs li + li::before { content: "/"; margin-right: .3rem; color: var(--line); }
.crumbs a { color: var(--soft); }

/* home */
.hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 2rem; align-items: center; padding: 2.6rem 0 1rem; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 800; color: var(--moss); margin: 0; }
.kicker a { color: inherit; text-decoration: none; }
.lede { font-size: 1.18rem; color: var(--soft); max-width: 62ch; }
.doors { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.door { display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); padding: .75rem 1.1rem; font: 400 1.35rem/1.2 var(--display); box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.door span { display: block; font: 600 .75rem/1.4 var(--text); text-transform: uppercase; letter-spacing: .1em; color: var(--soft); }
.door:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.door-run { background: var(--clay-bg); } .door-join { background: var(--moss-bg); }
.hero-board { margin: 0; justify-self: center; }
.hero-board .c1 { fill: var(--clay-bg); stroke: var(--clay); stroke-width: 2; } .hero-board .c2 { fill: var(--moss-bg); stroke: var(--moss); stroke-width: 2; }
.hero-board .c3 { fill: var(--ochre-bg); stroke: var(--ochre); stroke-width: 2; } .hero-board .c4 { fill: var(--sky-bg); stroke: var(--sky); stroke-width: 2; }
.hero-board .ln line { stroke: var(--soft); stroke-width: 3; stroke-linecap: round; opacity: .45; }
.hero-board .pin { fill: var(--clay); } .hero-board .tx { font: italic 26px var(--display); fill: var(--ink); }
.answer { max-width: 70ch; }
.steps-list { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 0; }
.steps-list li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem 1.1rem; position: relative; }
.steps-list li::before { content: counter(s); font: italic 2.4rem/1 var(--display); color: var(--clay); display: block; margin-bottom: .3rem; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1rem 0; }
.tool-tile { display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: var(--ink); padding: 1.1rem; border-radius: var(--r); border: 2px solid var(--ink); min-height: 150px; }
.tool-tile.n1 { background: var(--clay-bg); } .tool-tile.n2 { background: var(--moss-bg); } .tool-tile.n3 { background: var(--ochre-bg); } .tool-tile.n4 { background: var(--sky-bg); }
.tt-name { font: 400 1.3rem/1.2 var(--display); } .tt-blurb { font-size: .95rem; color: var(--soft); }
.tool-tile:hover .tt-name { text-decoration: underline; }

/* X section */
.xsec { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; margin-top: 2.5rem; padding: 1.6rem; background: var(--card); border: 2px dashed var(--line); border-radius: 14px; }
.xsec h2 { margin-top: 0; }
.x-search { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; }
.x-search a { display: inline-block; padding: .3rem .7rem; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; font-size: .92rem; color: var(--ink); }
.x-search a:hover { border-color: var(--ink); }
.x-box label { font-weight: 600; display: block; margin-bottom: .4rem; }
textarea, input, select { font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; padding: .55rem .65rem; width: 100%; max-width: 100%; }
textarea { resize: vertical; min-height: 6rem; }
textarea:focus, input:focus, select:focus { border-color: var(--moss); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--moss) 30%, transparent); }
.x-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .6rem; }
#x-count { font-weight: 800; font-variant-numeric: tabular-nums; } #x-count.over { color: var(--clay); }
.btn { display: inline-block; font: 600 1rem var(--text); background: var(--ink); color: var(--paper); border: 2px solid var(--ink); border-radius: 99px; padding: .55rem 1.15rem; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--card); color: var(--ink); border-color: var(--clay); }
.fine { font-size: .85rem; color: var(--soft); }

/* cards */
.track { margin-top: 1.6rem; } .track a { color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.card { background: var(--card); border-radius: 4px; padding: 1rem 1.1rem 1.2rem; border-top: 6px solid var(--clay); box-shadow: 0 1px 0 var(--line), 0 6px 14px -10px rgba(0,0,0,.35); }
.card.t-residencies { border-top-color: var(--moss); }
.card h3 { margin: .2rem 0 .4rem; font-size: 1.22rem; } .card h3 a { color: var(--ink); text-decoration: none; } .card h3 a:hover { text-decoration: underline; }
.card p { margin: 0; font-size: .95rem; color: var(--soft); }
.card .card-k { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--moss); }

/* documents */
.doc { padding: 1rem 0 2rem; }
.doc-head { max-width: 800px; padding: 1rem 0 .5rem; }
.meta { color: var(--soft); font-size: .92rem; }
.doc-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 2.4rem; align-items: start; }
.margin { position: sticky; top: 1rem; display: grid; gap: 1rem; }
.margin > * { background: var(--card); border-radius: var(--r); padding: .9rem 1rem; border-left: 5px solid var(--ochre); font-size: .95rem; }
.margin .short { border-left-color: var(--clay); }
.margin .toc { border-left-color: var(--sky); }
.short-h { font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .74rem; margin: 0 0 .3rem; color: var(--soft); }
.margin p, .margin ul, .margin ol { margin: 0; } .margin ul, .margin ol { padding-left: 1.1rem; } .margin li + li { margin-top: .35rem; }
.prose { max-width: 72ch; min-width: 0; }
.prose.wide { max-width: 80ch; }
.prose > h2:first-child { margin-top: .6rem; }
.prose h2 + p strong:only-child { display: block; font-weight: 600; }
.prose li { margin: .3rem 0; }
.prose blockquote { margin: 1rem 0; padding: .3rem 1rem; border-left: 4px solid var(--moss); font-family: var(--display); font-size: 1.15rem; }
.tablewrap { position: relative; overflow-x: auto; margin: 1rem 0; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--ochre-bg); font-weight: 800; }
tr:last-child td { border-bottom: 0; }
.tool-call { background: var(--moss-bg); border-radius: var(--r); padding: .8rem 1rem; }
.faq details { border-bottom: 1px solid var(--line); padding: .7rem 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; }
.faq details p { margin: .5rem 0 0; }
.sources ol { font-size: .92rem; padding-left: 1.2rem; word-break: break-word; }
.related { padding-bottom: 2rem; }
.plain { padding-left: 1.1rem; }
.glossary dt { font: 400 1.25rem var(--display); margin-top: 1.1rem; }
.glossary dd { margin: .2rem 0 0; color: var(--soft); }

/* tools */
.tool-panel { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 1.3rem; margin: 1rem 0 2rem; box-shadow: 6px 6px 0 var(--ochre); }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem 1rem; }
.fields label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.err { color: var(--clay); font-weight: 600; }
.summary { font-weight: 600; }
.plan-out { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.plan-title { grid-column: 1 / -1; margin: .5rem 0 0; }
.plan-day { background: var(--paper); border-radius: var(--r); padding: .2rem .8rem .6rem; border: 1px solid var(--line); }
.plan-day h3 { margin: .6rem 0 .3rem; }
.plan-day table { font-size: .9rem; } .plan-day td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--soft); width: 7.5rem; }
.plan-day tr.k-studio td:last-child { color: var(--moss); font-weight: 600; } .plan-day tr.k-share td:last-child { color: var(--clay); font-weight: 600; }
.plan-day tr.k-rest td { color: var(--soft); font-style: italic; }
.ac-sec { border-left: 5px solid var(--line); padding: .3rem 0 .3rem .9rem; margin-bottom: 1.1rem; }
.ac-sec.st-ok { border-left-color: var(--moss); } .ac-sec.st-close { border-left-color: var(--ochre); } .ac-sec.st-over { border-left-color: var(--clay); }
.ac-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.ac-top > label { font-weight: 600; }
.ac-lim { display: flex; gap: .4rem; align-items: center; font-size: .85rem; }
.ac-lim label { display: flex; gap: .3rem; align-items: center; }
.ac-lim input { width: 5.5rem; padding: .3rem .4rem; } .ac-lim select { width: auto; padding: .3rem .4rem; }
.ac-status { margin: .3rem 0 0; font-size: .9rem; color: var(--soft); }
.st-over .ac-status { color: var(--clay); font-weight: 600; }
.ac-h { font-size: 1.4rem; margin-top: 1.4rem; }
.ac-list { list-style: none; padding: 0; columns: 2 260px; }
.ac-list li { break-inside: avoid; margin: .3rem 0; }
.ac-list input { width: auto; margin-right: .4rem; }
.ac-total { font-weight: 600; }
.bg-table input, .bg-table select { padding: .35rem .45rem; font-size: .92rem; min-width: 4.5rem; }
.bg-table td:nth-child(2) input { min-width: 12rem; }
.bg-table .bg-line { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bg-table .x { border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: var(--soft); }
.bg-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; margin: 1rem 0; }
.bg-sum div { background: var(--paper); border-radius: var(--r); padding: .6rem .8rem; }
.bg-sum dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); font-weight: 800; }
.bg-sum dd { margin: 0; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.bg-sum .big { background: var(--ochre-bg); } .bg-sum .big dd { font: 400 1.6rem var(--display); }
.pp-out { padding-left: 1.3rem; } .pp-out li { margin: .7rem 0; font-size: 1.08rem; }
.pp-tag { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; background: var(--sky-bg); border-radius: 99px; padding: .1rem .55rem; margin-right: .3rem; vertical-align: 2px; }

/* footer */
.foot { margin-top: 3rem; background: var(--ink); color: var(--paper); padding: 2.2rem 0 1rem; }
.foot a { color: var(--paper); }
.foot-in { display: grid; grid-template-columns: 1.2fr 1.5fr; gap: 2rem; }
.foot .word { font-size: 2rem; margin: 0 0 .5rem; }
.foot-brand p { font-size: .9rem; opacity: .9; max-width: 52ch; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.foot-h { font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; opacity: .7; margin: 0 0 .4rem; }
.foot ul { list-style: none; padding: 0; margin: 0; font-size: .92rem; } .foot li { margin: .25rem 0; }
.foot-small { font-size: .8rem; opacity: .65; margin-top: 1.5rem; }
@media (prefers-color-scheme: dark) { .foot { background: #0f1117; color: var(--ink); } .foot a { color: var(--ink); } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 1.6rem; }
  .hero-board { max-width: 280px; }
  .steps-list { grid-template-columns: 1fr; }
  .xsec { grid-template-columns: 1fr; padding: 1.1rem; }
  .doc-grid { grid-template-columns: 1fr; gap: 1rem; }
  .margin { position: static; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .tabs { width: 100%; } .tabs a { padding: .45rem .55rem; font-size: .9rem; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .mark .sub { font-size: .68rem; }
}
@media print {
  .masthead, .foot, .crumbs, .actions, .tool-form .fields, .related, .prose, .doc-head .lede, .skip { display: none !important; }
  body { background: #fff; color: #000; } .tool-panel { box-shadow: none; border: 0; padding: 0; }
  .plan-day { break-inside: avoid; border: 1px solid #999; }
}
