/* Komade look for the customer pages of Konu MCP on link.komade.io (sign-in, consent, key page,
   dashboard, errors). The pages keep their markup and gateway-app.css; on a Komade host this file
   replaces /konu-design/tokens.css and loads after the page layout (gateway.css). It does two things:
   it gives every --konu-* role a Komade value, so the shared components turn blue and grey without a
   second copy, and it changes the few shapes where Komade differs from Konu (rounder panels on a mist
   page, notices without a side bar, Nunito Sans headings, the link.komade.io logo in the bar).
   Values come from ../tokens.json. Komade has two colours and one light theme: there is no red, no
   orange and no dark mode, so an error is told apart by its icon, its words and a 2px ink edge. */

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/komade/NunitoSans-ExtraBold.ttf) format("truetype");
}

:root {
  color-scheme: light;

  /* Komade palette (tokens.json) */
  --komade-blue: #0968a3;
  --komade-blue-hover: #075586;
  --komade-blue-pressed: #06466f;
  --komade-highlight: #d9eaf5;
  --komade-highlight-hover: #c3ddec;
  --komade-ink: #102d40;
  --komade-muted: #536979;
  --komade-grey: #ededed;
  --komade-mist: #f6f8f8;
  --komade-white: #ffffff;
  --komade-field-border: #78909f;
  --komade-notice: #eaf2f7;
  --komade-font-heading: "Nunito Sans", Arial, sans-serif;

  /* The Konu roles the shared components read, in Komade values */
  --konu-white: var(--komade-white);
  --konu-bg: var(--komade-mist);
  --konu-surface: var(--komade-white);
  --konu-line: var(--komade-grey);
  --konu-fg: var(--komade-ink);
  --konu-heading: var(--komade-ink);
  --konu-muted: var(--komade-muted);
  --konu-accent: var(--komade-blue);
  --konu-accent-fg: var(--komade-white);
  --konu-link: var(--komade-blue);
  --konu-cta: var(--komade-blue);
  --konu-cta-hover: var(--komade-blue-hover);
  --konu-ok-fg: var(--komade-blue);
  --konu-warn-fg: var(--komade-ink);
  --konu-warn-bg: var(--komade-highlight);
  --konu-bad-fg: var(--komade-ink);
  --konu-bad-bg: var(--komade-grey);
  --konu-info-bg: var(--komade-notice);
  --konu-hover-bg: var(--komade-highlight);
  --konu-highlight: var(--komade-highlight);
  --konu-icon-bg: var(--komade-highlight);
  --konu-icon-fg: var(--komade-blue);
  --konu-coral: var(--komade-blue);
  --konu-sage: var(--komade-blue);
  --konu-sand: var(--komade-ink);
  --konu-shadow-card: none;
  --konu-shadow-sheet: 0 8px 24px rgba(16, 45, 64, 0.16);

  --konu-font: Arial, sans-serif;
  --konu-font-heading: var(--komade-font-heading);
  --konu-tracking-heading: 0;
  --konu-fs-h1: 40px;
  --konu-fs-h2: 20px;
  --konu-fs-h3: 18px;
  --konu-fs-h4: 16px;
  --konu-fs-h5: 16px;
  --konu-fs-body: 14px;
  --konu-fs-small: 13px;
  --konu-fw-regular: 400;
  --konu-fw-semibold: 600;
  --konu-fw-bold: 700;

  --konu-radius-xs: 8px;
  --konu-radius-sm: 8px;
  --konu-radius: 8px;
  --konu-radius-lg: 16px;
  --konu-radius-chip: 8px;
  --konu-radius-pill: 999px;

  --konu-space-xs: 4px;
  --konu-space-sm: 8px;
  --konu-space-md: 16px;
  --konu-space-lg: 32px;
  --konu-space-xl: 48px;
  --konu-tap: 48px;
}

body { background: var(--komade-mist); color: var(--komade-ink); }

/* The bar: the link.komade.io logo on the left, the language switch on the right. */
.bar { min-height: 0; max-width: 45rem; padding: 48px var(--konu-space-md) 0; }
.brand { gap: 0; }
.brand img { width: 380px; max-width: 100%; height: auto; border-radius: 0; }
.brand .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.langs { border-color: var(--komade-field-border); background: var(--komade-white); }

main, .foot { max-width: 45rem; }
main { padding-top: var(--konu-space-lg); }

/* Headings in Nunito Sans 800, the way the Komade book sets them. */
h1 {
  margin: 0 0 var(--konu-space-md);
  font: 800 var(--konu-fs-h1)/1.15 var(--komade-font-heading);
  color: var(--komade-ink);
  text-wrap: balance;
}
.k-section > h2 {
  font: 800 22px/1.25 var(--komade-font-heading);
  color: var(--komade-ink);
  text-transform: none;
  letter-spacing: 0;
  padding: 0;
}
main > p:first-of-type:not(.k-fine) { font-size: 17px; }

/* A list is a white panel on the mist page: no outline, 16px corners, grey hairlines between rows. */
.k-list { border: 0; border-radius: var(--konu-radius-lg); background: var(--komade-white); box-shadow: none; overflow: hidden; }
.k-list > li + li { border-top: 1px solid var(--komade-grey); }
.k-item { min-height: 56px; padding: 12px 20px; }
.k-item > .k-icon, .k-item > .ic { color: var(--komade-blue); }
a.k-item:hover, button.k-item:hover, summary.k-item:hover { background: var(--komade-highlight); }
.k-item input {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--komade-field-border);
  border-radius: 8px;
  background: var(--komade-white);
  color: var(--komade-ink);
}
.k-item input::placeholder { color: var(--komade-muted); }
details .k-list { background: var(--komade-mist); }
code { border: 0; border-radius: 8px; background: var(--komade-mist); color: var(--komade-ink); }

/* Buttons: blue fill, 8px corners, 48px high; hover and pressed in the darker blues. */
.k-btn { min-height: 48px; padding: 0 24px; border-radius: 8px; font-weight: 600; }
.k-btn:hover:not([disabled]) { background: var(--komade-blue-hover); border-color: var(--komade-blue-hover); }
.k-btn:active:not([disabled]) { background: var(--komade-blue-pressed); border-color: var(--komade-blue-pressed); }
.k-btn--secondary { background: var(--komade-white); border-color: var(--komade-blue); color: var(--komade-blue); }
.k-btn--secondary:hover:not([disabled]) { background: var(--komade-highlight); border-color: var(--komade-blue); }
.k-btn--danger { background: var(--komade-white); border: 2px solid var(--komade-ink); color: var(--komade-ink); }
.k-btn--danger:hover:not([disabled]) { background: var(--komade-grey); border-color: var(--komade-ink); }
.k-btn[disabled] { opacity: 1; background: var(--komade-grey); border-color: var(--komade-grey); color: var(--komade-muted); }

/* Focus: a 3px blue ring outside the shape. */
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, .k-btn:focus-visible {
  outline: 3px solid var(--komade-blue);
  outline-offset: 3px;
}
a.k-item:focus-visible, button.k-item:focus-visible, summary.k-item:focus-visible { outline-offset: -3px; }

/* Notices: the Komade notice, a soft blue box with 12px corners and a blue icon, no side bar.
   ok and info stay soft blue; warn is the highlight blue; an error is grey with a 2px ink edge and
   an ink icon, so it reads without colour. */
.k-note {
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--komade-notice);
  color: var(--komade-ink);
  font-weight: 600;
}
.k-note > .ic, .k-note > .k-icon { color: var(--komade-blue); }
.k-note--ok { background: var(--komade-notice); }
.k-note--warn { background: var(--komade-highlight); }
.k-note--warn > .ic { color: var(--komade-ink); }
.k-note--bad { background: var(--komade-white); border: 2px solid var(--komade-ink); }
.k-note--bad > .ic { color: var(--komade-ink); }

.small { color: var(--komade-muted); }
a { color: var(--komade-blue); text-underline-offset: 3px; }

/* Landing: the step dots and the action keep their own blues. */
.k-go:active { background: var(--komade-blue-pressed); }
.k-copy-btn { border-color: var(--komade-field-border); }
.k-copy-btn:hover { background: var(--komade-highlight); }

/* The error page (error.html): a status line above the title, the way out as one button. */
.k-status { margin: 0 0 var(--konu-space-sm); color: var(--komade-muted); font: 600 14px/1.3 Arial, sans-serif; letter-spacing: 0.04em; text-transform: uppercase; }

/* Direction A, Rustig paneel: one white panel per subject on the mist page, large steps, one blue
   action, quiet fine print. The sizes are those of the mockup of 31 October 2026. */
.k-hero { margin: 0 0 var(--konu-space-lg); }
.k-hero h1 { isolation: isolate; margin: 0; font-size: 52px; line-height: 1.08; letter-spacing: -0.02em; }
/* Behind the line above it, or the highlight cuts off that line's descenders. */
.k-mark { position: relative; z-index: -1; border-radius: 0; color: var(--komade-ink); }
.k-steps { display: flex; flex-direction: column; gap: 28px; margin: 0 0 var(--konu-space-lg); padding: 32px; }
.k-steps > li { column-gap: 20px; padding: 0; }
.k-steps > li:not(:last-child)::before { content: none; }
.k-step-dot { font-size: 18px; }
.k-steps h3 { margin: 0; font-size: 22px; line-height: 1.5; color: var(--komade-ink); }
.k-steps p { margin: 6px 0 0; font-size: 17px; line-height: 1.5; color: var(--komade-ink); }
.k-steps .k-step-link ~ p { margin-top: 4px; font-size: 14px; color: var(--komade-muted); }
.k-step-link, .k-howto > summary { min-height: 44px; margin-top: 6px; font-size: 16px; font-weight: 700; text-underline-offset: 3px; }
.k-copy { margin-top: 12px; }
.k-copy code { padding: 14px 16px; font-size: 15px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.k-copy-btn { min-height: 48px; padding: 0 20px; border-color: var(--komade-blue); border-radius: 8px; color: var(--komade-blue); font-size: 16px; font-weight: 700; }
.k-howto ol { background: var(--komade-mist); color: var(--komade-ink); font-size: 15px; }
main > .k-howto ol { background: var(--komade-white); }
.k-go { min-height: 64px; padding: 0 28px; border-radius: 8px; font-size: 19px; }
.k-go .ic { width: 26px; height: 26px; }
main > p.k-fine, .k-fine { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--komade-muted); }
.small { font-size: 14px; }
.k-lead { color: var(--komade-ink); }
.k-section { margin-bottom: var(--konu-space-lg); }
.k-section > h2 { margin: 0 0 12px; }
.k-panel { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.k-panel .k-copy { margin: 0; }
.k-panel .k-step-link { margin: 0; }
.k-item-label { font-weight: 700; }
.k-item-sub { font-size: 13px; line-height: 1.4; }
.k-item > .ic { width: 28px; height: 28px; }

@media (max-width: 559px) {
  /* On a phone the logo spans the width of the page, and the page has a 20px gutter. */
  :root { --konu-fs-h1: 34px; }
  .bar { padding: 20px 20px 0; }
  .brand { width: 100%; }
  .brand img { width: 100%; }
  main { padding: 24px 20px; }
  .foot { padding: 0 20px 32px; }
  .k-hero { margin-bottom: 24px; }
  .k-hero h1 { font-size: 34px; line-height: 1.12; }
  .k-steps { gap: 26px; margin-bottom: 24px; padding: 22px 18px; }
  .k-steps > li { grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; }
  .k-step-dot { width: 36px; height: 36px; font-size: 17px; }
  .k-steps h3 { font-size: 20px; }
  .k-copy code { flex-basis: 100%; padding: 12px 14px; font-size: 14px; }
  .k-copy-btn { flex: 1 1 100%; justify-content: center; }
  .k-go { min-height: 60px; margin-bottom: 24px; padding: 0 22px; font-size: 18px; }
  .k-go .ic { width: 24px; height: 24px; }
  .k-panel { padding: 20px 18px; }
  .k-item { gap: 10px; padding: 12px 14px; }
  .k-item-end { gap: 4px; }
  .k-badge { padding: 3px 8px; }
  .k-note { padding: 14px 16px; gap: 12px; font-size: 15px; }
}

@media (prefers-reduced-motion: no-preference) {
  .k-btn, .k-item { transition: background-color .15s; }
}

/* Customer pages take the full width for their one action, like the landing. */
.k-btn--block { width: 100%; }
.k-badge { margin-right: 0; font-size: 12px; font-weight: 700; background: var(--komade-highlight); color: var(--komade-ink); }
.k-badge--todo { background: var(--komade-white); border: 2px solid var(--komade-ink); }

/* The language switch at the foot, with a full tap target on a phone. */
.foot-langs { display: flex; justify-content: center; padding: var(--konu-space-md) 0 0; }
.foot-langs .langs { border-color: var(--komade-field-border); }
.foot-langs .langs button { min-width: 52px; min-height: 44px; padding: 0 18px; font-size: 14px; }
