/* FREE SAILING — org-settings.css. The Settings workspace (four tabs) and the
   World Sailing Day workspace, which share this one stylesheet on purpose —
   org-wsd.js's own note explains why: two small files, each mounting on five
   dashboard pages neither owns, are one shared injected <link> away from
   never disagreeing about which of them got there first.

   NO NEW PALETTE. Same rule org-ui.css and org-deals.css both state for
   themselves: every colour below is one of the tokens dash.css/site.css
   already define. This file adds shapes, not a seventh blue.

   EXTENDS org-ui.css's shared workspace vocabulary (.ws-head, .ws-sub,
   .ws-tabs, .ws-check, .ws-row, .btn…) rather than re-declaring it — the
   `st-` prefix below is only for what Settings and World Sailing Day
   genuinely need beyond that shared set. */

/* ─────────────────────────────────────────────────────── tab body + headings.
   Each tab writes its own <h2> rather than reusing the workspace's own <h1> —
   "Settings" the destination and "The organisation" / "Who can use this
   board" the tab are different-sized facts, and collapsing them to one size
   is how a tabbed workspace starts to read as four separate pages. */
.st-body { margin-top: 4px; }
.st-h { font-size: 18px; margin: 0 0 4px; }
.st-h3 { font-size: 14.5px; margin: 26px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.st-lede { color: var(--ink-60); font-size: 13.5px; margin: 0 0 20px; max-width: 62ch; line-height: 1.55; }
.st-note {
  display: block; font-size: 12.5px; color: var(--ink-40);
  margin-top: 3px; line-height: 1.5; max-width: 60ch;
}
p.st-note { margin: 0 0 16px; max-width: 62ch; }
.st-actions { margin: 0 0 18px; }

/* ───────────────────────────────────────────────────────────── tab 1, facts.
   A definition list, not a form — these are read, not edited, here; each one
   already has a real editor somewhere else and this only ever names it. */
.st-facts { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; margin: 0 0 22px; }
.st-facts dt { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-40); }
.st-facts dd { margin: 0; font-size: 14.5px; }
.st-facts a { color: var(--hl, #1F5FD0); }
@media (max-width: 560px) {
  .st-facts { grid-template-columns: 1fr; gap: 2px 0; }
  .st-facts dt { margin-top: 10px; }
}

/* The one line carried from the `page` card, plus the door to its own
   workspace — never the checklist itself, which org-page.js still owns. */
.st-page {
  margin-top: 4px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg, #FBFCFE);
}
.st-page .st-h3 { margin-top: 0; padding-top: 0; border-top: 0; }
.st-page .st-note { margin: 4px 0 14px; }

/* ──────────────────────────────────────────────────────── tab 2, team & access. */
.st-role {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; border-radius: 999px; padding: 2px 9px;
  background: var(--line-2, #EEF3F9); color: var(--ink-60); vertical-align: middle;
}
.st-role-owner { background: #E7EEFB; color: #1F4FA8; }
.st-role-viewer { background: #F1F1F4; color: #5A5A66; }
.st-you {
  display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600;
  color: var(--ink-40); vertical-align: middle;
}
.st-row .ws-row-t { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 0; }

.st-seats { list-style: none; margin: 0; padding: 0; }
.st-seats li {
  display: flex; align-items: baseline; gap: 12px; padding: 9px 0;
  border-top: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-60);
}
.st-seats li:first-child { border-top: 0; }
.st-seats .st-role { flex: 0 0 auto; min-width: 64px; text-align: center; }

/* ───────────────────────────────────────────────────────── tab 3, notifications.
   A real grid rather than three columns simulated with floats — the header
   row is part of the grid so the "Here" / "Email" labels never drift out of
   register with the switches under them on a narrow board. */
.st-grid { display: grid; grid-template-columns: 1fr 74px 74px; align-items: center; }
.st-grid-h {
  display: contents;
}
.st-grid-h span {
  font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-40);
  padding: 0 0 8px; text-align: center;
}
.st-grid-h span:first-child { text-align: left; }
.st-grid-r { display: contents; }
.st-grid-r > div:first-child {
  padding: 13px 12px 13px 0; border-top: 1px solid var(--line-2); grid-column: 1;
}
.st-grid-r > div:first-child b { display: block; font-size: 13.5px; }
.st-grid-r .st-note { margin-top: 2px; }
.st-grid-r .st-sw { border-top: 1px solid var(--line-2); }

/* The switch itself: a track and a knob, drawn rather than borrowed from a
   native checkbox, so "on this board" and "by email" read identically instead
   of one being a checkbox and the other a styled button. */
.st-sw {
  justify-self: center; align-self: center; width: 38px; height: 22px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--line-2, #EEF3F9);
  padding: 2px; cursor: pointer; position: relative;
}
.st-sw-k {
  display: block; width: 16px; height: 16px; border-radius: 999px;
  background: var(--white); box-shadow: 0 1px 2px rgba(2, 22, 56, .25);
  transform: translateX(0); transition: transform .15s ease;
}
.st-sw.is-on { background: var(--hl, #1F5FD0); border-color: var(--hl, #1F5FD0); }
.st-sw.is-on .st-sw-k { transform: translateX(16px); }
.st-sw.is-locked { cursor: default; opacity: .55; }
.st-sw:focus-visible { outline: 2px solid var(--hl, #1F5FD0); outline-offset: 2px; }

.st-count { margin: 18px 0 0; font-size: 13px; color: var(--ink-60); }
.st-count b { font-variant-numeric: tabular-nums; }

/* ──────────────────────────────────────────────────────────── tab 4, privacy. */
.st-pv { margin: 0 0 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.st-pv:first-of-type { padding-top: 0; border-top: 0; }
.st-pv h3 { font-size: 14.5px; margin: 0 0 6px; }
.st-pv p { font-size: 13.5px; line-height: 1.6; color: var(--ink-60); margin: 0 0 8px; max-width: 62ch; }
.st-pv p:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
  .st-grid { grid-template-columns: 1fr 56px 56px; }
  .st-seats li { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════════════ World Sailing Day.
   Extends .ws-check exactly as org-deals.css extends it for the page
   checklist — same list, same tick, the addition is only the trailing
   control a step's own row needs (Link, Mark as told, We got some…). */
.wd-check li { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.wd-check .tick { margin-top: 2px; }
.wd-check .lbl { padding-right: 6px; }
.wd-act { flex: 0 0 auto; margin-left: auto; }
.wd-act:empty { display: none; }

.wd-outcome {
  margin-top: 22px; padding: 14px 16px; border-radius: 10px;
  background: var(--bg, #FBFCFE); border: 1px solid var(--line);
}
.wd-outcome p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink); }

/* A button that reads as the tail of a sentence, not a control of its own —
   "Not taking part after all?" belongs in the line it sits inside. */
.wd-linklike {
  background: none; border: 0; padding: 0; margin: 0; font: inherit;
  font-size: inherit; color: var(--hl, #1F5FD0); cursor: pointer; text-decoration: underline;
}

@media (max-width: 640px) {
  .wd-act { margin-left: 0; }
}
