/* =====================================================================================================
   TableSync — the two web surfaces the service serves: the join page a friend lands on, and the admin UI
   the owner uses. Same design system as the app (docs/mockups/tablesync.html, D21):

     · Monochrome, white accent, Inter. Dark and light, following the operating system.
     · 🔴 The chamfer is the red thread: 45° cut at the BOTTOM RIGHT of every interactive control
       (9 px ≈ 22 % of the height; 7 small, 11 large). Surfaces are sharp — radius 0. The edge follows
       the cut, drawn as two layers, exactly as Engine's ChamferBorder does.
     · Colour only on the abnormal (ISA-101), and never colour alone (WCAG 1.4.1) — every state carries
       a word.

   🔴 No web fonts. The join page is the first thing somebody sees when a link arrives, sometimes on a
   phone on mobile data, and a blocking font request is a blank page. Inter if the machine has it, the
   system stack otherwise.
   ===================================================================================================== */

:root {
  --canvas: #f4f6f9;
  --panel: #ffffff;
  --raised: #e9edf3;
  --line: rgba(18, 21, 28, .12);
  --line2: rgba(18, 21, 28, .28);
  --text: #12151c;
  --body: #3c4453;
  --dim: #6b7583;
  --action: #12151c;
  --on-action: #ffffff;
  --ok: #0f8a63;
  --warn: #b45309;
  --stop: #dc2626;
  --sans: 'Inter', 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0b0d11;
    --panel: #171b23;
    --raised: #1f232e;
    --line: rgba(255, 255, 255, .09);
    --line2: rgba(255, 255, 255, .22);
    --text: #eef1f6;
    --body: #b4bcc8;
    --dim: #7d8696;
    --action: #ffffff;
    --on-action: #0a0a0a;
    --ok: #34d399;
    --warn: #fbbf24;
    --stop: #f87171;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 72px 20px 64px;
}

main.wide { max-width: 1080px; }

/* ---- the wordmark, after the app's logo cell (D17: TABLESYNC only, no Fasetech mark) ---- */
.brand {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 24px;
}

.brand b {
  font-weight: 600;
  font-size: 19px;
  letter-spacing: .16em;
}

/* 🔴 No tagline beside the wordmark (owner 2026-09-09: "bordet, live skal også væk"). The rule that
   styled it is deleted rather than left unused — a rule nobody reads is worse than no rule at all. */

h1 { font-size: 30px; font-weight: 600; margin: 0 0 12px; letter-spacing: -.02em; }
h2 { font-size: 13px; font-weight: 600; margin: 32px 0 10px; color: var(--dim);
     text-transform: uppercase; letter-spacing: .08em; }
p { color: var(--body); margin: 0 0 14px; }
p.dim { color: var(--dim); font-size: 13px; }

/* ---- the download page (docs/mockups/hente-side.html) ----

   🔴 <b>The page had no visual anchor at all.</b> Wordmark, heading, paragraph, list — every element
   the same weight, left against the edge of a wide empty window, and the one action a visitor came for
   buried inside item 1 of a numbered list. It read as a text file rather than a product, and the owner
   said so in those words (2026-09-09).

   Three things fix it, and none of them adds a colour or a font. The MARK, which existed in
   docs/brand/tablesync-mark.svg and had never been used: a square with a piece in the corner — a table,
   seen from above — inlined so it inherits currentColor and works in both themes without a request. A
   CENTRED hero, because a single-action page has a single focal point and hugging the left margin gives
   it none. And a PANEL around the instructions, so the page is two clear zones — what to do, and what
   happens after — instead of one undifferentiated column.

   The steps stay left-aligned inside their panel: a procedure is read in order, and centred prose is
   read badly. */
.hero { text-align: center; margin-bottom: 40px; }
.hero .brand { margin-top: 0; }

.mark {
  display: block;
  width: 46px;
  height: 46px;
  margin: 0 auto;
  color: var(--text);
}

.lede { font-size: 17px; line-height: 1.5; color: var(--body); margin: 0 auto 30px; max-width: 42ch; }
.cta  { margin: 0 0 12px; }
.meta { margin: 0; }

.steps {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 22px 24px 8px;
  margin-bottom: 26px;
}

.steps h2 { margin-top: 0; }

/* A closing remark under a centred composition, centred with it. Left-aligned it reads as the
   start of a new column that never comes. */
.note { text-align: center; }
.row.note { justify-content: center; }
.steps > p:last-child, .steps details:last-child { margin-bottom: 16px; }

/* ---- progressive disclosure: the one instruction most people never need ----
   🔴 The web's version of "forklaringer hører i tooltips, ikke på fladen" (CLAUDE.md). Smart App
   Control is off on almost every machine that will ever open this page; a paragraph about it, sitting
   there permanently, is read once by everybody and needed by nearly nobody. */
details { border-top: 1px solid var(--line); margin: 20px 0 28px; }
details summary { cursor: pointer; padding: 12px 0; color: var(--dim); font-size: 14px; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+"; display: inline-block; width: 16px; font-weight: 600; }
details[open] summary::before { content: "\2212"; }
details summary:hover { color: var(--text); }
details summary:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
details > p { margin: 0 0 16px; padding-left: 16px; font-size: 14px; }
a { color: var(--text); }

/* ---- surfaces are sharp; only controls are cut ---- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 20px;
  margin-bottom: 16px;
}

/* ---- 🔴 the chamfer, two layers so the rim follows the cut (Engine's ChamferBorder) ---- */
.btn {
  --cut: 9px;
  position: relative;
  isolation: isolate;
  display: inline-block;
  border: 0;
  border-radius: 0;
  background: var(--line2);
  padding: 9px 16px;
  font: inherit;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: var(--panel);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut) + 1px), calc(100% - var(--cut) + 1px) 100%, 0 100%);
}

.btn:hover::before { background: var(--raised); }
.btn:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }

.btn.primary { background: var(--action); color: var(--on-action); }
.btn.primary::before { background: var(--action); }
.btn.primary:hover::before { filter: brightness(1.15); }

.btn.big { --cut: 11px; padding: 12px 22px; font-size: 16px; }
.btn.small { --cut: 7px; padding: 5px 10px; font-size: 13px; }

.btn:disabled { opacity: .45; cursor: not-allowed; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* 🔴 Classes, not style="" attributes. The CSP is `style-src 'self'` with no 'unsafe-inline' (Program.cs),
   so an inline style attribute is silently DROPPED by the browser — the rule still applies, the layout just
   quietly comes out wrong, with nothing in any log. Found by the backend audit 2026-09-07. */
.row.spread { justify-content: space-between; }
.narrow { max-width: 240px; }

/* ---- small controls keep radius 4, as in the app ---- */
input[type="text"], input[type="email"] {
  background: var(--canvas);
  border: 1px solid var(--line2);
  border-radius: 4px;
  color: var(--text);
  font: inherit;
  padding: 9px 11px;
  width: 100%;
}

input:focus-visible { outline: 2px solid var(--action); outline-offset: 1px; }

label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 6px; }

code, .mono { font-family: var(--mono); font-size: 13px; }

.code {
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: .08em;
  padding: 10px 14px;
  background: var(--raised);
  display: inline-block;
}

/* ---- status words carry a mark as well as a colour (WCAG 1.4.1) ---- */
.state { font-weight: 500; }
.state.ok { color: var(--ok); }
.state.warn { color: var(--warn); }
.state.stop { color: var(--stop); }
.state::before { margin-right: 6px; }
.state.ok::before { content: "\2713"; }
.state.warn::before { content: "\26A0"; }
.state.stop::before { content: "\2715"; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

ol { color: var(--body); padding-left: 20px; }
ol li { margin-bottom: 8px; }

.hidden { display: none !important; }

footer { margin-top: 44px; color: var(--dim); font-size: 12px; text-align: center; }

@media (max-width: 640px) {
  main { padding: 44px 16px 48px; }
  h1 { font-size: 25px; }
  .lede { font-size: 16px; margin-bottom: 26px; }
  .steps { padding: 18px 18px 6px; }
}
