/* Shared look for the tool and Concierge pages (plain HTML, not built by Astro).
   The tokens mirror src/styles/global.css: change both together.
   Opt in with <body class="app">; add "app-navy" for the Concierge navy page.
   Base rules use :where() so they never out-rank a page's own styles.
   Rules: only the --t-* sizes, no animations, no uppercase labels. Bump ?v= on every change. */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/manrope-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/manrope-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/manrope-latin-600-normal.woff2) format('woff2'); }
/* the serif is for public front doors only; member screens never use it, so it is never downloaded there */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/cormorant-garamond-latin-400-normal.woff2) format('woff2'); }

:root {
  --bone: #efe9df;
  --bone-2: #e4dccf;
  --espresso: #17130f;
  --walnut: #6b4a33;
  --brass: #c49455;
  --stone: #554d43;
  --navy: #1f2f58;            /* Carpentry Concierge anchor colour */
  --on-dark: #efe9df;
  --on-dark-2: rgba(239, 233, 223, .78);
  --hair: rgba(23, 19, 15, .16);
  --hair-dark: rgba(239, 233, 223, .18);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, sans-serif;
  --err: #9b3426;
  --ok: #2e6b2e;
  --t-small: .9375rem;
  --t-body: 1.0625rem;
  --t-lead: clamp(1.3rem, 1.7vw, 1.6rem);
  --t-h3: clamp(1.6rem, 2.3vw, 2.2rem);
  --t-h2: clamp(2.1rem, 4vw, 3.8rem);
}

:where(.app), :where(.app) *, :where(.app) *::before, :where(.app) *::after { box-sizing: border-box; margin: 0; padding: 0; }
:where(.app) { background: var(--bone); color: var(--espresso); font-family: var(--sans); font-size: var(--t-body); line-height: 1.65; overflow-x: clip; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
:where(.app.app-navy) { background: var(--navy); color: var(--on-dark); }
:where(.app) a { color: inherit; }
:where(.app) img { max-width: 100%; height: auto; }
:where(.app) :focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* panel: the bone sheet a form or a block of content sits on */
.ui-panel { background: var(--bone); color: var(--espresso); border-radius: 6px; padding: 2rem 1.75rem; }

/* form fields */
.ui-field { margin-bottom: 1.25rem; }
.ui-label { display: block; font-size: var(--t-small); font-weight: 500; color: var(--stone); margin-bottom: .4rem; }
.ui-input { width: 100%; font: 400 var(--t-body) var(--sans); color: var(--espresso); background: #fff; border: 1px solid var(--hair); border-radius: 6px; padding: .8rem .9rem; }
.ui-input:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; border-color: var(--brass); }
.ui-input::placeholder { color: #8a8278; }

/* buttons: one shape. Navy on light, bone on dark. */
.ui-btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; font: 500 var(--t-body) var(--sans); text-decoration: none; color: var(--bone); background: var(--navy); border: 0; border-radius: 100px; padding: .9rem 1.6rem; cursor: pointer; transition: background-color .3s ease, color .3s ease; }
.ui-btn:hover { background: var(--brass); color: var(--espresso); }
.ui-btn:disabled { opacity: .6; cursor: default; background: var(--navy); color: var(--bone); }
.ui-btn.wide { width: 100%; }
.ui-btn.on-dark { background: var(--bone); color: var(--espresso); }
.ui-btn.on-dark:hover { background: var(--brass); }

/* status line under a form. Scripts set class "msg", "msg error" or "msg ok". */
.app .msg { font-size: var(--t-small); min-height: 1.5em; margin-top: 1rem; }
.app .msg.error { color: var(--err); }
.app .msg.ok { color: var(--ok); }

.ui-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ui-link:hover { color: var(--brass); }

/* ---- slim header and footer for tool and member pages (never printed) ---- */
.app-head { display: flex; align-items: center; gap: 1rem; padding: .7rem clamp(1rem, 4vw, 2.5rem); background: var(--espresso); color: var(--on-dark); font: 400 var(--t-small)/1.4 var(--sans); }
.app-head.navy { background: var(--navy); }
.app-head a { color: inherit; text-decoration: none; }
.app-head nav { display: flex; gap: 1.4rem; margin-left: auto; white-space: nowrap; }
.app-head nav a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.app-head a:focus-visible, .app-foot a:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.app-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.6rem; padding: 2rem clamp(1rem, 4vw, 2.5rem); background: var(--espresso); color: var(--on-dark-2); font: 400 var(--t-small)/1.5 var(--sans); }
.app-foot a { color: var(--on-dark); text-decoration: none; }
.app-foot a:hover { color: var(--brass); }
.app-foot .copy { margin-left: auto; }
@media (max-width: 520px) { .app-foot .copy { margin-left: 0; width: 100%; } }
@media print { .app-head, .app-foot { display: none !important; } }

/* ---- Neewoody | Carpentry Concierge lockup (2026-11-16): same height, thin line between ----
   The same lockup is in the Astro header (src/styles/global.css .nav-lockup). Keep them in step. */
.lockup { display: flex; align-items: center; gap: 14px; flex: none; min-width: 0; }
.lockup a { color: inherit; text-decoration: none; display: flex; align-items: center; }
.lockup-nw img { display: block; height: 40px; width: auto; }
.lockup-rule { flex: none; width: 1px; height: 30px; background: currentColor; opacity: .35; }
.lockup-cc { gap: 9px; }
.lockup-cc img { display: block; width: 34px; height: 34px; }
.lockup-cc span, .lockup-sec { font: 600 10px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.lockup-sec { opacity: .78; }
@media (max-width: 760px) { .lockup-sec, .lockup-sec-rule { display: none; } }
@media (max-width: 520px) {
  .lockup { gap: 10px; }
  .lockup-nw img { height: 32px; }
  .lockup-rule { height: 24px; }
  .lockup-cc img { width: 28px; height: 28px; }
  .lockup-cc span { font-size: 8.5px; letter-spacing: .14em; }
  .app-head nav { gap: .9rem; }
  .app-head nav a + a { display: none; } /* one link on phones; the logos link home */
  .app-head { padding: .5rem 1rem; }
}
@media (max-width: 350px) { .lockup-cc span { display: none; } }

/* Shared tool settings panel (js/tool-settings.js, 2026-11-17): a gear at the end of the
   tool header opens a side panel (full screen on phones) over the work in progress. */
.ts-gear { display: inline-flex; align-items: center; gap: .45rem; margin-left: auto; padding: .45rem .8rem; border: 1px solid var(--hair-dark); border-radius: 100px; background: transparent; color: inherit; font: 500 var(--t-small)/1 var(--sans); cursor: pointer; white-space: nowrap; }
.app-head nav + .ts-gear { margin-left: 1.2rem; }
.ts-gear:hover { border-color: var(--brass); color: var(--brass); }
.ts-gear:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.ts { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(460px, 100%); max-width: 100%; height: 100%; max-height: 100%; border: 0; padding: 0; background: var(--bone); color: var(--espresso); font: 400 var(--t-small)/1.5 var(--sans); box-shadow: -12px 0 40px rgba(0,0,0,.25); }
.ts[open] { display: flex; flex-direction: column; }
.ts::backdrop { background: rgba(23,19,15,.45); }
.ts-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem .6rem; }
.ts-head h2 { font: 600 var(--t-body)/1.2 var(--sans); }
.ts-x { border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--stone); cursor: pointer; padding: .2rem .5rem; }
.ts-tabs { display: flex; gap: .4rem; padding: 0 1.2rem; border-bottom: 1px solid var(--hair); }
.ts-tabs button { border: 0; background: none; padding: .6rem .2rem; margin-right: .9rem; font: 500 var(--t-small)/1 var(--sans); color: var(--stone); cursor: pointer; border-bottom: 2px solid transparent; }
.ts-tabs button[aria-selected="true"] { color: var(--espresso); border-bottom-color: var(--brass); }
.ts-body { flex: 1; overflow-y: auto; padding: 1rem 1.2rem 1.4rem; }
.ts-group { border: 0; margin: 0 0 1.3rem; padding: 0; }
.ts-group legend { font: 600 var(--t-small)/1.3 var(--sans); margin-bottom: .6rem; }
.ts-seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.ts-seg button { flex: 1 1 auto; padding: .55rem .7rem; border: 1px solid var(--hair); border-radius: 6px; background: #fff; color: var(--espresso); font: 500 var(--t-small)/1.2 var(--sans); cursor: pointer; }
.ts-seg button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--on-dark); }
.ts-hint, .ts-note { color: var(--stone); margin-top: .5rem; }
.ts-note { background: var(--bone-2); padding: .6rem .8rem; border-radius: 6px; margin-bottom: 1rem; }
.ts-hint a { color: var(--walnut); }
.ts-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .2rem 1rem; padding: .45rem 0; border-bottom: 1px solid var(--hair); }
.ts-row label { color: var(--espresso); }
.ts-num { display: inline-flex; align-items: center; gap: .3rem; }
.ts-num i { font-style: normal; color: var(--stone); }
.ts-num input, .ts-field input, .ts-field textarea { font: 400 var(--t-small)/1.4 var(--sans); color: var(--espresso); background: #fff; border: 1px solid var(--hair); border-radius: 6px; padding: .45rem .55rem; }
.ts-num input { width: 6.5rem; text-align: right; }
.ts-num input:focus-visible, .ts-field input:focus-visible, .ts-field textarea:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }
.ts-eq { grid-column: 1 / -1; color: var(--stone); }
.ts-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; }
.ts-field textarea { resize: vertical; }
.ts-foot { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.2rem; border-top: 1px solid var(--hair); background: var(--bone); }
.ts-status { flex: 1; color: var(--stone); }
.ts-save { padding: .65rem 1.4rem; border: 0; border-radius: 100px; background: var(--navy); color: var(--on-dark); font: 500 var(--t-small)/1 var(--sans); cursor: pointer; }
.ts-save:hover { background: var(--brass); color: var(--espresso); }
.ts-save:disabled { opacity: .6; cursor: default; }
.ts-local { border: 0; background: none; color: var(--walnut); font: 500 var(--t-small)/1.3 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
@media (max-width: 640px) { .ts-gear span { display: none; } .ts-gear { padding: .45rem; } .ts { width: 100%; } }
@media print { .ts-gear, .ts { display: none !important; } }
