:root {
  --bg: oklch(0.985 0.004 160);
  --panel: oklch(1 0 0);
  --line: oklch(0.9 0.01 175);
  --text: oklch(0.21 0.02 190);
  --muted: oklch(0.5 0.02 185);
  --accent: oklch(0.78 0.11 78);
  --primary: oklch(0.41 0.078 178);
  --ink: oklch(0.2 0.03 205);
  --ink-foreground: oklch(0.97 0.01 175);
  --ink-muted: oklch(0.72 0.02 185);
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; }
.landing-body { min-height: 100svh; display: flex; flex-direction: column; }
header.app-header {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 22px; background: var(--ink); color: var(--ink-foreground);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.mark { width: 32px; height: 32px; }
.wordmark { font-size: 16px; font-weight: 700; letter-spacing: 0.14em; }
.brand p { margin: 2px 0 0; color: var(--ink-muted); font-size: 12px; }
.auth-slot { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.auth-btn {
  border-radius: 999px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08); color: var(--ink-foreground);
  padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.auth-btn.outline { background: var(--ink-foreground); color: var(--ink); }
.landing { max-width: 1080px; margin: 0 auto; padding: 56px 22px 24px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.landing h1, .studio-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.03em; margin: 12px 0 8px;
}
.lede { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 1.4rem; color: var(--muted); }
.landing-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.action {
  display: inline-flex; border-radius: 999px; padding: 12px 18px; font-weight: 650; font-size: 14px; text-decoration: none;
  border: 1px solid var(--ink); color: var(--ink); background: transparent; cursor: pointer;
}
.action.primary { background: var(--ink); color: var(--ink-foreground); }
.action { font: inherit; }
body.paywalled #grid, body.paywalled .toolbar { filter: blur(6px); pointer-events: none; user-select: none; }
dialog.sheet {
  width: min(420px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}
dialog.sheet::backdrop { background: rgba(12,34,38,.45); }
dialog.sheet h2 { margin: 0 0 8px; font-size: 22px; }
dialog.sheet menu.pay-actions {
  display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 16px 0 0;
}
dialog.sheet menu.pay-actions .action { width: 100%; justify-content: center; }
.grid-intro { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 48px; }
.grid-intro article { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.grid-intro h2 { margin: 0 0 8px; font-size: 16px; }
.grid-intro p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.site-footer {
  margin-top: auto; padding: 22px; background: var(--ink); color: var(--ink-muted); font-size: 13px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
}
.site-footer a { color: var(--ink-foreground); }
.studio-head { max-width: 1100px; margin: 0 auto; padding: 28px 24px 8px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; align-items: center; }
.toolbar input, .toolbar select {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
}
.toolbar input[type=search] { flex: 1; min-width: 220px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; max-width: 1100px; margin: 0 auto; padding: 12px 24px 48px; }
article.card { border: 1px solid var(--line); border-radius: 14px; overflow: visible; background: #fff; position: relative; z-index: 1; }
article.card:hover, article.card:focus-within { z-index: 40; }
.flag {
  height: 92px;
  border-radius: 14px 14px 0 0;
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 10px 14px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 22px;
}
.flag-de { background: linear-gradient(#000 33%, #dd0000 33% 66%, #ffce00 66%); color: #0c2226; }
.flag-nl { background: linear-gradient(#ae1c28 33%, #fff 33% 66%, #21468b 66%); }
.flag-nl span { color: #21468b; }
.flag-fr { background: linear-gradient(90deg, #002395 33%, #fff 33% 66%, #ed2939 66%); color: #002395; }
.flag-es { background: linear-gradient(#aa151b 25%, #f1bf00 25% 75%, #aa151b 75%); color: #aa151b; }
.flag-it { background: linear-gradient(90deg, #009246 33%, #fff 33% 66%, #ce2b37 66%); color: #009246; }
.flag-uk { background: linear-gradient(135deg, #012169, #c8102e 55%, #012169); }
.flag-other { background: linear-gradient(135deg, #0c2226, #2a6f7a); }
.flag-at { background: linear-gradient(#ed2939 33%, #fff 33% 66%, #ed2939 66%); color: #ed2939; }
.flag-be { background: linear-gradient(90deg, #000 33%, #fae042 33% 66%, #ed2939 66%); }
.flag-hr { background: linear-gradient(#ff0000 33%, #fff 33% 66%, #171796 66%); }
.flag-cz { background: linear-gradient(135deg, #11457e, #fff 40%, #d7141a); }
.flag-dk { background: #c60c30; }
.flag-ee { background: linear-gradient(#0072ce 33%, #000 33% 66%, #fff 66%); }
.flag-fi { background: #fff; color: #002f6c; }
.flag-gr { background: repeating-linear-gradient(#0d5eaf, #0d5eaf 12%, #fff 12%, #fff 24%); }
.flag-hu { background: linear-gradient(#ce2939 33%, #fff 33% 66%, #477050 66%); }
.flag-lv { background: linear-gradient(#9e3039 40%, #fff 40% 60%, #9e3039 60%); }
.flag-lt { background: linear-gradient(#fdb913 33%, #006a44 33% 66%, #c1272d 66%); color: #006a44; }
.flag-mt { background: linear-gradient(90deg, #fff 50%, #cf142b 50%); color: #cf142b; }
.flag-pl { background: linear-gradient(#fff 50%, #dc143c 50%); color: #dc143c; }
.flag-pt { background: linear-gradient(90deg, #006600 40%, #ff0000 40%); }
.flag-ro { background: linear-gradient(90deg, #002b7f 33%, #fcd116 33% 66%, #ce1126 66%); }
.flag-sk { background: linear-gradient(#fff 33%, #0b4ea2 33% 66%, #ee1c25 66%); color: #0b4ea2; }
.flag-si { background: linear-gradient(#fff 33%, #005ce6 33% 66%, #ed1c24 66%); color: #005ce6; }
.flag-se { background: #006aa7; }
.flag-gb { background: linear-gradient(135deg, #012169, #c8102e 55%, #012169); }
.cap { padding: 10px 12px 12px; font-size: 13px; }
.cap strong { display: block; font-size: 14px; margin-bottom: 4px; }
.cap a { color: var(--primary); }
.meta { color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.badge {
  display: inline-block; margin: 4px 0 6px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; background: #e7f3ee; color: #0f7a3a;
}
.bureau-list { margin: 8px 0 0; padding-left: 18px; }
.bureau-list li { margin: 3px 0; }
.view-toggle { display: flex; gap: 0; }
.view-toggle button {
  font: inherit; font-size: 13px; font-weight: 650; padding: 8px 14px;
  border: 1px solid var(--ink); background: #fff; cursor: pointer;
}
.view-toggle button:first-child { border-radius: 999px 0 0 999px; }
.view-toggle button:last-child { border-radius: 0 999px 999px 0; margin-left: -1px; }
.view-toggle button.on { background: var(--ink); color: var(--ink-foreground); }
.table-wrap { max-width: 1240px; margin: 0 auto; padding: 8px 24px 64px; overflow: visible; width: 100%; }
.table-wrap.is-hidden, .grid.is-hidden { display: none !important; }
.table-scroller { overflow-x: auto; width: 100%; }
body.mode-table .grid { display: none !important; }
body.mode-gallery .table-wrap { display: none !important; }
table.studio { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
table.studio > thead th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line); padding: 10px 8px;
}
table.studio > tbody > tr.co > td { border-bottom: 1px solid var(--line); padding: 12px 8px; vertical-align: top; }
table.studio a { color: var(--primary); word-break: break-all; }
.exp { border: 0; background: transparent; cursor: pointer; font: inherit; width: 22px; }
table.studio tr.nested td { background: oklch(0.97 0.01 175); padding: 8px 8px 16px 36px; }
table.jobs { width: 100%; border-collapse: collapse; font-size: 13px; }
table.jobs th, table.jobs td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
table.jobs th { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
table.studio tr.co { cursor: pointer; }
table.studio tr.co:hover { background: oklch(0.97 0.01 175); }
.auto-bubbles { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.auto-cell { width: 220px; }
.auto-bubble {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 700; cursor: default; white-space: nowrap;
}
.auto-bubble b { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.auto-bubble.ok { background: #d9f3e3; color: #0f7a3a; }
.auto-bubble.no { background: #fde0e0; color: #9b2c2c; }
.auto-bubble.maybe { background: #fff3c4; color: #8a6d00; }
.policy-toast {
  position: fixed; z-index: 2147483000; width: min(320px, calc(100vw - 24px));
  max-height: min(70vh, 420px); overflow: auto; white-space: normal;
  font-weight: 500; font-size: 13px; line-height: 1.5; text-align: left;
  color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px; box-shadow: 0 24px 64px rgba(12,34,38,.28);
}
.policy-toast strong { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.policy-toast p { margin: 0; }

#feature-request { display: grid; gap: 8px; min-width: min(20rem, 100%); margin: 8px 0 0; }
#feature-request input, #feature-request textarea, #feature-request button {
  font: inherit; padding: 8px 10px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: inherit;
}
#feature-request textarea { min-height: 4.2rem; resize: vertical; }
#feature-request button { cursor: pointer; font-weight: 650; background: #f4f7f6; color: #142428; border: 0; }

.footer-action-btn {
  font: inherit; cursor: pointer; background: transparent; color: inherit;
  border: 1px solid currentColor; border-radius: 999px; padding: 6px 12px;
  font-size: 13px; font-weight: 650;
}
.graphai-dialog {
  border: 0; border-radius: 16px; padding: 16px;
  max-width: min(520px, calc(100vw - 24px)); color: #142428; background: #fff;
}
.graphai-dialog::backdrop { background: rgba(12, 34, 38, .55); }
.graphai-dialog-close {
  float: right; border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer;
}
#feature-request { display: grid; gap: 8px; margin-top: 8px; }
#feature-request input, #feature-request textarea, #feature-request button {
  font: inherit; padding: 8px 10px; border-radius: 10px;
  border: 1px solid #d5e0dc; background: #fff; color: #142428;
}
#feature-request button[type="submit"] { cursor: pointer; font-weight: 650; background: #142428; color: #f4f7f6; border: 0; }

#feature-request-dialog.graphai-dialog {
  width: min(1560px, calc(100vw - 32px));
  max-width: min(1560px, calc(100vw - 32px));
  height: min(960px, calc(100vh - 32px));
  min-height: min(720px, calc(100vh - 32px));
  max-height: calc(100vh - 24px);
  padding: 28px 32px;
  box-sizing: border-box;
}
#feature-request-dialog #feature-request {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  height: calc(100% - 2.5rem);
  min-height: 0;
  min-width: 0;
  margin-top: 12px;
}
#feature-request-dialog #feature-request input,
#feature-request-dialog #feature-request textarea,
#feature-request-dialog #feature-request button {
  font-size: 1.05rem;
  padding: 12px 14px;
}
#feature-request-dialog #feature-request textarea {
  min-height: 24rem;
  height: 100%;
  resize: vertical;
}
