/* Public "Connect to eduroam" page. Same brand as the console:
   green #02614d, flame #ffba00 -> #ff9900, white background, black text. */

:root {
  --green: #02614d;
  --green-dark: #014a3b;
  --green-tint: #eaf4f1;
  --flame-yellow: #ffba00;
  --flame-orange: #ff9900;
  --flame: linear-gradient(90deg, var(--flame-yellow), var(--flame-orange));
  --ink: #111614;
  --ink-2: #3a423f;
  --ink-3: #5d6763;
  --line: #e4e8e6;
  --canvas: #f5f7f6;
  --surface: #fff;
  --radius: 12px;
  --focus: 0 0 0 3px rgba(255, 153, 0, .6);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (max-width: 560px) { html { scroll-padding-top: 110px; } }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--surface); }
img { max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 2px; }
a:hover { color: var(--green-dark); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
h1, h2, h3 { line-height: 1.25; color: var(--ink); }
h2 { font-size: 1.75rem; margin: 0 0 16px; }
h2::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 10px; border-radius: 2px; background: var(--flame); }
.center h2::after { margin-left: auto; margin-right: auto; }
.mono, code, pre { font-family: var(--mono); }
.mono { font-size: .95em; overflow-wrap: anywhere; }
.quiet { color: var(--ink-3); font-weight: 400; }
.hint { color: var(--ink-2); font-size: .92rem; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.center { text-align: center; }

.skip { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

/* Header */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--green); color: #fff; border-bottom: 4px solid transparent; border-image: var(--flame) 1; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { border-radius: 50%; background: #fff; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-size: 1.15rem; }
.brand small { font-size: .78rem; opacity: .9; letter-spacing: .04em; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav a { color: #fff; text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: .95rem; }
.topbar nav a:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* Hero */
.hero { background: linear-gradient(160deg, var(--green-tint), #fff 65%); padding: 40px 0 48px; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); margin: 0 0 12px; }
.lead { font-size: 1.15rem; color: var(--ink-2); margin: 0 0 24px; max-width: 36em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Photos (optional slots, see portal/photos.py) */
.photo { display: block; width: 100%; height: auto; object-fit: cover; border-radius: var(--radius); background: var(--canvas); }
.hero-in { display: block; }
.has-photo .hero-in { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.hero-photo { aspect-ratio: 16 / 10; box-shadow: 0 8px 24px rgba(16, 24, 20, .12); }
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.split .photo { aspect-ratio: 4 / 3; }
.shot { margin: 20px 0 0; max-width: 320px; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; }
.shot figcaption { font-size: .85rem; color: var(--ink-3); margin-top: 6px; }
#windows .shot, #mac .shot, #linux .shot, #chromeos .shot { max-width: 640px; }
.help-where { display: flex; gap: 8px 24px; justify-content: center; flex-wrap: wrap; }
.help-photo { aspect-ratio: 3 / 2; max-width: 560px; margin: 24px auto 0; }
#privacy ul { padding-left: 20px; }
#privacy h3.sub { margin-top: 24px; }

/* Partner logos: one row, same height, so none dominates */
.logos { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 0 0 24px; }
.logos img { height: 48px; width: auto; object-fit: contain; }
.logos-sm { gap: 16px; margin-bottom: 12px; }
.logos-sm img { height: 36px; }

/* Buttons */
.btn { display: inline-block; padding: 11px 20px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 2px solid transparent; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { border-color: var(--green); color: var(--green); background: #fff; }
.btn-ghost:hover { background: var(--green-tint); }
.btn-flame { background: var(--flame); color: #000; }
.btn-flame:hover { color: #000; filter: brightness(.96); }

/* Sections */
.section { padding: 56px 0; }
.section.alt { background: var(--canvas); }
.section h3.sub { margin: 32px 0 12px; font-size: 1.15rem; }

/* 4 steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; border-top: 4px solid var(--green); }
.steps h3 { margin: 10px 0 6px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--flame); color: #000; font-weight: 700; }

/* Safety note */
.safety { margin: 0 0 20px; padding: 12px 16px; border-left: 4px solid var(--flame-orange); background: #fff8eb; border-radius: 0 8px 8px 0; }
.notice-plain { padding: 12px 16px; border-radius: var(--radius); background: var(--canvas); border: 1px dashed var(--line); }

.cat { margin-top: 20px; padding: 18px 20px; border-radius: var(--radius); background: var(--green-tint); border: 1px solid #cfe5dd; }
.cat h3 { margin: 0 0 6px; }


/* Tabs */
.tabs { margin-top: 8px; }
.tablist { position: relative; display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; box-shadow: inset 0 -2px 0 var(--line); }
.tablist::-webkit-scrollbar { display: none; }
.tablist button { flex: none; white-space: nowrap; font: inherit; font-weight: 600; padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--ink-2); cursor: pointer; border-radius: 6px 6px 0 0; }
.tablist button:hover { color: var(--green); background: var(--green-tint); }
.tablist button[aria-selected="true"] { color: var(--green); border-bottom-color: var(--flame-orange); }
.no-js .tablist { display: none; }
.panel { padding: 20px 0 0; }
.no-js .panel { border-top: 1px solid var(--line); margin-top: 16px; }
.panel h3 { margin: 0 0 12px; }
.panel:target:focus-visible { box-shadow: none; }   /* opened by a #android-style link, not the keyboard */
.panel > p .btn { margin-bottom: 4px; }
.guide { padding-left: 22px; margin: 0; }
.guide > li { margin: 0 0 14px; padding-left: 4px; }
.guide > li::marker { font-weight: 700; color: var(--green); }
.guide ul { margin: 8px 0; padding-left: 20px; }
.guide .hint { display: block; margin-top: 4px; }
.fields { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 10px 0; padding: 12px 16px; background: var(--canvas); border-radius: 8px; }
.fields dt { font-weight: 600; }
.fields dd { margin: 0; }

/* FAQ */
#faq details { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 10px; background: #fff; }
#faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after { content: "+"; color: var(--green); font-size: 1.3rem; line-height: 1; }
#faq details[open] summary::after { content: "\2212"; }
#faq details > :not(summary) { margin: 0 16px 14px; }

/* Help + footer */
.help { background: var(--green); color: #fff; }
.help h2, .help a { color: #fff; }
.help .btn-flame { color: #000; }
.footer { padding: 28px 0; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.footer p { margin: 4px 0; }

@media (max-width: 860px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .has-photo .hero-in, .split { grid-template-columns: 1fr; gap: 24px; }
  .hero-photo { order: -1; aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  /* Phones: menu becomes one row that scrolls sideways under the brand */
  .topbar-in { gap: 0; padding-top: 8px; }
  .topbar nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 4px -16px 0; padding: 0 12px 6px; width: calc(100% + 32px); }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { flex: none; }
  .logos { gap: 14px; }
  .logos img { height: 40px; }
  .fields { grid-template-columns: 1fr; gap: 0 0; }
  .fields dd { margin-bottom: 8px; }
  .section { padding: 40px 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
