/* Palette, type, header, tabs and the small pieces every view uses. */
:root {
  --ink: #111;
  --ink-2: #555;
  --ink-3: #8c8c8c;
  --line: #e7e7e5;
  --soft: #f5f5f3;
  --bg: #fff;

  --ok: #1f8a5b;      /* chosen */
  --no: #c8412e;      /* discarded */
  --warn: #b7791f;    /* check before buying */
  --alber: #2f5bd3;
  --nuria: #c2477a;

  --r: 10px;
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }

#app { max-width: 1280px; margin: 0 auto; padding: 0 32px 80px; }

/* ---- header ---- */
/* Brand left, main nav centred, sync right: the shop's own top bar. */
.top {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.top h1 { margin: 0; font-size: 18px; letter-spacing: -.01em; }

/* ---- tabs ---- */
/* Text links whose active one is underlined on the rule below them. */
.tabs { display: flex; }
.tabs button { padding: 0; margin-bottom: -1px; color: var(--ink-3); }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

/* Main: centred in the header, full height, so the active one sits on the header line. */
.tabs.main { align-self: stretch; gap: 36px; }
.tabs.main button { height: 72px; font-weight: 500; }

/* Sub: same language, smaller, under the header. */
.tabs.sub { gap: 28px; margin: 24px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tabs.sub button { padding: 10px 0; color: var(--ink-2); }
.tabs.sub button.on { color: var(--ink); }

.sync { justify-self: end; display: flex; gap: 8px; }
.sync button { font-size: 13px; color: var(--ink-2); padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.sync button:hover { border-color: var(--ink-3); }

/* ---- shared bits ---- */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.muted { color: var(--ink-3); font-weight: 400; }
.who.alber { color: var(--alber); }
.who.nuria { color: var(--nuria); }
.foot { color: var(--ink-3); font-size: 13px; margin-top: 16px; }

/* ---- paste dialog ---- */
dialog { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; width: min(520px, 90vw); }
dialog::backdrop { background: rgba(0,0,0,.25); }
dialog h3 { margin: 0 0 6px; }
dialog p { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; }
dialog textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: 12px ui-monospace, monospace; }
dialog menu { display: flex; justify-content: flex-end; gap: 8px; margin: 16px 0 0; padding: 0; }
dialog menu button { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); }
dialog menu .primary { background: var(--ink); color: #fff; border-color: var(--ink); }
