/* Irish Web Speeds, in o6o International's look (o6ointernational.com: css/style.css):
   warm paper background, navy and burnt orange, Archivo throughout, one fixed light theme.
   Charts: mobile is the brand orange, desktop the brand navy, everything else muted. */

@font-face { font-family: Archivo; src: url("fonts/archivo-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Archivo; src: url("fonts/archivo-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Archivo; src: url("fonts/archivo-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Archivo; src: url("fonts/archivo-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #F7F5EF;
  --surface: #FFFFFF;
  --surface-tint: #EAEDF1;
  --ink: #1C1C1C;
  --ink-soft: rgba(28, 28, 28, 0.68);
  --primary: #123A63;
  --primary-ink: #FFF9F4;
  --accent: #D9622B;
  --accent-text: #AC4C20;
  --line: rgba(18, 58, 99, 0.16);
  --good: #1E7A46;
  --bad: #B3261E;

  --mobile: #D9622B;
  --mobile-text: #AC4C20;
  --desktop: #123A63;
  --other: rgba(18, 58, 99, 0.16);
  --grid: rgba(18, 58, 99, 0.10);
  --ref: rgba(18, 58, 99, 0.32);

  --font: Archivo, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --content-width: 1160px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font); line-height: 1.15; text-wrap: balance; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: var(--primary); text-decoration-color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-text); }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: auto; background: var(--surface); color: var(--ink); padding: 0.6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
}
@media (max-width: 480px) {
  .container { padding-left: max(1rem, env(safe-area-inset-left, 0px)); padding-right: max(1rem, env(safe-area-inset-right, 0px)); }
}

/* ---- header (as on o6ointernational.com) ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 245, 239, 0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 4.5rem; }
.wordmark { display: inline-flex; align-items: flex-end; line-height: 1; font-weight: 700; font-size: 1.3rem; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.wordmark:hover { color: var(--ink); }
.mark { display: block; height: 1.725rem; width: auto; margin-right: 0.45em; }
.header-link { font-weight: 600; font-size: 0.95rem; text-decoration: none; color: var(--ink); }
.header-link:hover { color: var(--accent-text); }

/* ---- hero ---- */
.hero { padding: 3.5rem 0 3rem; }
.eyebrow { display: inline-block; font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-text); font-weight: 700; margin-bottom: 0.6rem; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.01em; margin-bottom: 1rem; }
.lede { max-width: 62ch; font-size: 1.15rem; line-height: 1.55; }
.lede b { font-weight: 700; font-variant-numeric: tabular-nums; }
.through { margin-top: 0.75rem; color: var(--ink-soft); font-size: 0.9rem; }

.skeleton { color: transparent; background: var(--surface-tint); border-radius: 3px; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 2.25rem; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.tile-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.big { font-size: 2.6rem; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--primary); }
.tile-note { font-size: 0.88rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.tile-note b { font-weight: 700; font-variant-numeric: tabular-nums; }
.up { color: var(--good); }
.down { color: var(--bad); }
.tile-foot { margin-top: 0.9rem; font-size: 0.85rem; color: var(--ink-soft); max-width: 80ch; }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.mobile { background: var(--mobile); }
.dot.desktop { background: var(--desktop); }

/* ---- sections ---- */
.section { padding: 3.5rem 0; }
.section--tight { padding: 2rem 0 3rem; }
.section--tint { background: var(--surface-tint); }
.section-head { margin-bottom: 1.5rem; max-width: 70ch; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 0.5rem; }
.section-head p { color: var(--ink-soft); }
.footnote { margin-top: 0.9rem; font-size: 0.85rem; font-style: italic; color: var(--ink-soft); max-width: 75ch; }
.note { margin-top: 1rem; color: var(--ink-soft); font-size: 0.92rem; max-width: 70ch; }

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-bottom: 1.25rem; }
.pick { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 0.95rem; min-width: 0; max-width: 100%; }
.pick select {
  font: inherit; font-weight: 500; color: var(--ink); background-color: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.45rem 2rem 0.45rem 0.7rem; min-width: 0; max-width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23123A63' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.7rem center;
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.seg button { font: inherit; font-size: 0.88rem; font-weight: 500; background: transparent; color: var(--ink-soft); border: 0; padding: 0.45rem 0.85rem; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }

/* Picked companies: one colour each, kept for as long as the company stays picked. Orange and
   navy are left for the two median lines. */
:root { --pick-0: #1C1C1C; --pick-1: #0E7C86; --pick-2: #7B3FA0; --pick-3: #2F7A2E; --pick-4: #C0284D; }
.c0 { --pick: var(--pick-0); }
.c1 { --pick: var(--pick-1); }
.c2 { --pick: var(--pick-2); }
.c3 { --pick: var(--pick-3); }
.c4 { --pick: var(--pick-4); }

.share { font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--primary); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.45rem 0.85rem; cursor: pointer; }
.share:hover { border-color: var(--primary); }
.share-done { font-size: 0.88rem; color: var(--good); font-weight: 600; overflow-wrap: anywhere; }
.pick select:disabled { color: var(--ink-soft); cursor: not-allowed; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.75rem; margin-bottom: 0.75rem; }
.cards:empty { display: none; }
.company-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--pick); border-radius: var(--radius); padding: 0.75rem 2.4rem 0.8rem 0.9rem; display: grid; gap: 0.35rem; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.6rem; min-width: 0; }
.card-head h3 { font-size: 1.05rem; }
.card-head a { font-size: 0.85rem; overflow-wrap: anywhere; }
.card-stats { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; margin: 0; }
.card-stats div { display: flex; align-items: baseline; gap: 0.4rem; }
.card-stats dt { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; font-size: 0.82rem; color: var(--ink-soft); }
.card-stats dd { margin: 0; font-size: 0.82rem; color: var(--ink-soft); }
.card-stats dd b { font-size: 1.2rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.card-remove { position: absolute; top: 0.45rem; right: 0.45rem; width: 1.9rem; height: 1.9rem; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); font: inherit; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.card-remove:hover { background: var(--surface-tint); color: var(--ink); }
.clear-all { margin-bottom: 1rem; }
.legend > .legend-picks { display: contents; }
@media (max-width: 480px) {
  .cards { gap: 0.5rem; }
  .company-card { padding: 0.55rem 2.2rem 0.55rem 0.75rem; gap: 0.2rem; }
  .card-stats .rank { display: none; }
}
.legend-picks > span { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--ink); font-weight: 600; }
.swatch.pick { border-top-color: var(--pick); }
.text-button { justify-self: start; padding: 0; border: 0; background: transparent; color: var(--primary); cursor: pointer; font: inherit; font-size: 0.9rem; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.15em; }
.text-button:hover { color: var(--accent-text); }

.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1rem; }
.legend > span { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend-note { font-style: italic; }
.swatch { width: 22px; height: 0; border-top: 3px solid var(--other); display: inline-block; flex: none; }
.swatch.dashed { border-top-style: dashed; }
.swatch.mobile { border-top-color: var(--mobile); }
.swatch.desktop { border-top-color: var(--desktop); }
.swatch.solid { border-top-color: var(--ink); }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 900px) { .pair { grid-template-columns: minmax(0, 1fr); } }
.pair > div { min-width: 0; display: grid; gap: 0.5rem; }
.pair h3 { font-size: 1.05rem; }

/* ---- charts ---- */
.chart { position: relative; min-height: 280px; min-width: 0; }
@media (max-width: 520px) { .chart { min-height: 230px; } }
.chart--short { min-height: 160px; }
.chart--rows { min-height: 420px; max-width: 900px; }
.chart svg { display: block; overflow: visible; font-family: var(--font); }
.chart .tick { fill: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .name { fill: var(--ink); font-size: 13px; }
.chart .name.on { font-weight: 700; }
.chart .val { fill: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .end { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart .end.mobile { fill: var(--mobile-text); }
.chart .end.desktop { fill: var(--desktop); }
.chart .end.pick { fill: var(--pick); }
.chart .pickbar { fill: var(--pick); }
.chart .grid { stroke: var(--grid); }
.chart .ref { stroke: var(--ref); stroke-dasharray: 3 3; }
.chart .axis-line { stroke: var(--ref); }
.chart .other { fill: none; stroke: var(--other); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.chart .median { fill: none; stroke-width: 2.5; stroke-dasharray: 6 4; stroke-linecap: round; stroke-linejoin: round; }
.chart .median.mobile { stroke: var(--mobile); }
.chart .median.desktop { stroke: var(--desktop); }
.chart .pickline { fill: none; stroke: var(--pick); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .hover { fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.chart .hoverdot { fill: var(--accent-text); stroke: var(--surface); stroke-width: 1.5; pointer-events: none; }
.chart .bar { stroke: var(--other); stroke-width: 3; stroke-linecap: round; }
.chart .m { fill: var(--mobile); stroke: var(--surface); stroke-width: 1.5; }
.chart .d { fill: var(--desktop); stroke: var(--surface); stroke-width: 1.5; }
.chart .rowband { fill: transparent; cursor: pointer; }
.chart .rowband.on { fill: rgba(18, 58, 99, 0.07); }
.chart .rowband:hover { fill: rgba(18, 58, 99, 0.06); }
.chart .rowband.on:hover { fill: rgba(18, 58, 99, 0.11); }
.chart g[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chart .area { fill: rgba(18, 58, 99, 0.12); }
.chart .share { fill: none; stroke: var(--desktop); stroke-width: 1.5; stroke-linejoin: round; }
.chart .overlay { fill: transparent; touch-action: pan-y; }
.chart .msg { padding: 2rem 0; color: var(--ink-soft); }

.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(18, 58, 99, 0.14); border-radius: var(--radius); padding: 0.5rem 0.7rem; font-size: 0.85rem; line-height: 1.45; white-space: nowrap; }
.tip div:first-child { font-weight: 700; }
.tip div + div { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ---- method ---- */
#method details { max-width: 75ch; color: var(--ink-soft); font-size: 0.95rem; }
#method summary { cursor: pointer; color: var(--ink); font-weight: 600; }
#method ul { margin: 0.8rem 0 0; padding-left: 1.2em; display: grid; gap: 0.5rem; }

/* ---- footer (as on o6ointernational.com) ---- */
.site-footer { background: var(--ink); color: rgba(247, 245, 239, 0.7); padding: 3rem 0 2rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.footer-grid .wordmark { color: var(--primary-ink); }
.footer-tag { margin-top: 0.6rem; font-size: 0.85rem; }
.footer-links { display: flex; gap: 1.5rem; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; align-items: center; }
.footer-links a { color: rgba(247, 245, 239, 0.75); text-decoration: none; font-size: 0.88rem; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(247, 245, 239, 0.15); padding-top: 1.5rem; font-size: 0.8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
