/* The OVH stock page. Colors, type, shadows and motion are Dudbox's
   (apps/website/landing/page/style.css), with a dark set of the same names. */

@font-face { font-family: 'Figtree'; src: url('/fonts/figtree-latin.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/fonts/geist-mono-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #0E1014; --ink-2: #3B3F48; --muted: #5D616B; --faint: #8A8E96;
  --edge: #DEE0E4; --edge-hover: #BABEC6; --rule: #EDEEF0;
  --paper: #FFFFFF; --fill: #F1F2F4; --hover: #F8F9FA; --page: #FCFBF8;
  --live: #1E9E5A; --live-ink: #1E7A4A; --live-bg: #E3F5EB;
  --warn: #E9A23B; --warn-ink: #8F5A0E; --warn-bg: #FDF3E1;
  --fail: #E5484D; --fail-ink: #B42318;
  --track: #ECEDF0; --stripe: rgba(14,16,20,.05);
  --shadow-button: 0 1px 2px rgba(14,16,20,.06);
  --shadow-card: 0 1px 2px rgba(14,16,20,.05), 0 8px 20px rgba(14,16,20,.05);
  --shadow-window: 0 2px 6px rgba(14,16,20,.04), 0 16px 48px rgba(14,16,20,.14);
  --sans: 'Figtree', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --fast: 150ms; --mid: 300ms; --slow: 450ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --r: 14px; --r-sm: 9px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #EDEEF0; --ink-2: #C9CCD2; --muted: #9A9EA7; --faint: #6E727B;
    --edge: #262A31; --edge-hover: #383D46; --rule: #1E2127;
    --paper: #15181D; --fill: #1D2026; --hover: #1A1D22; --page: #0E1014;
    --live: #2DBE70; --live-ink: #5FD394; --live-bg: rgba(45,190,112,.14);
    --warn: #E9A23B; --warn-ink: #F0BC6E; --warn-bg: rgba(233,162,59,.14);
    --fail: #F2555A; --fail-ink: #FF8A85;
    --track: #22262C; --stripe: rgba(255,255,255,.04);
    --shadow-button: none;
    --shadow-card: 0 1px 2px rgba(0,0,0,.3);
    --shadow-window: 0 16px 48px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 15px/1.45 var(--sans); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
code { font: 500 .86em var(--mono); background: var(--fill); padding: .1em .35em; border-radius: 5px; }
h1, h2 { margin: 0; letter-spacing: -.01em; }

.wrap {
  max-width: 1080px; margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(48px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

/* ---------- top ---------- */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.top h1 { font-size: 28px; font-weight: 700; line-height: 1.1; }
.sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.sep { color: var(--faint); margin: 0 2px; }
.checked { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); display: inline-block; }
.checked.ok .dot { background: var(--live); box-shadow: 0 0 0 3px var(--live-bg); }
.checked.slow .dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.checked.down .dot { background: var(--fail); }
.checked.down { color: var(--fail-ink); }
.actions { display: flex; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px;
  border: 1px solid var(--edge); border-radius: 10px; background: var(--paper);
  box-shadow: var(--shadow-button); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:hover { border-color: var(--edge-hover); }
.btn:active { transform: scale(.98); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--ink); color: var(--page); border-color: var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }
.on-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }

/* ---------- filters ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--edge);
  background: transparent; color: var(--ink-2); font-size: 13.5px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.chip:hover { border-color: var(--edge-hover); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--page); border-color: var(--ink); }
.chip .n { font-weight: 500; opacity: .6; }
.chip .live { width: 6px; height: 6px; border-radius: 50%; background: var(--live); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--fill); }
.seg button { height: 26px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-button); }

/* ---------- groups and rows ---------- */
.group { margin-bottom: 22px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 8px; }
.group-head h2 { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.group-head span { font-size: 13px; color: var(--faint); }
.card { background: var(--paper); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--shadow-card); }
.rows { overflow: hidden; }

.row {
  display: grid; align-items: center; gap: 14px;
  grid-template-columns: 30px minmax(0, 1.25fr) 84px minmax(0, 1.5fr) 132px;
  padding: 12px 16px 12px 10px; border-top: 1px solid var(--rule);
  transition: background var(--fast) var(--ease);
}
.row:first-child { border-top: 0; }
.row.open-able { cursor: pointer; }
.row.open-able:hover { background: var(--hover); }
.row.flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 30% { background: var(--live-bg); } }

.bell {
  width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--faint);
  display: grid; place-items: center; cursor: pointer; transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.bell:hover { background: var(--fill); color: var(--ink-2); }
.bell svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.bell[aria-pressed="true"] { color: var(--ink); }
.bell[aria-pressed="true"] svg path:first-child { fill: currentColor; }

.main { min-width: 0; }
.name { font-weight: 650; font-size: 15px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.name .gen { font-weight: 500; color: var(--faint); font-size: 13px; }
.chev { width: 15px; height: 15px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--mid) var(--ease); flex: none; }
.row.open .chev { transform: rotate(90deg); }
.specs { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.price { text-align: right; font-weight: 600; font-size: 14px; }
.price small { display: block; color: var(--faint); font-weight: 500; font-size: 11.5px; }
.price-inline { display: none; }

.hist { display: flex; align-items: center; gap: 10px; min-width: 0; }
.track { position: relative; flex: 1; height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.seg-now, .seg-later, .seg-unk { position: absolute; top: 0; bottom: 0; min-width: 2px; }
.seg-now { background: var(--live); }
.seg-later { background: var(--warn); }
.seg-unk { background: repeating-linear-gradient(-45deg, var(--stripe) 0 3px, transparent 3px 6px); min-width: 0; }
.pct { width: 34px; text-align: right; font-size: 12px; color: var(--faint); flex: none; }

.state { justify-self: end; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--muted); }
.state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.state.now { background: var(--live-bg); color: var(--live-ink); }
.state.now::before { opacity: 1; background: var(--live); }
.state.later { background: var(--warn-bg); color: var(--warn-ink); }
.state.later::before { opacity: 1; background: var(--warn); }
.state.out { color: var(--faint); }

/* a dedicated plan's configs */
.configs { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--slow) var(--ease); background: var(--hover); }
.configs.open { grid-template-rows: 1fr; }
.configs > div { overflow: hidden; min-height: 0; }
.configs .row { padding-left: 26px; background: transparent; }
.configs .row:first-child { border-top: 1px solid var(--rule); }
.configs .name { font-weight: 550; font-size: 14px; }
.configs .note { padding: 12px 26px 14px 66px; color: var(--faint); font-size: 13px; border-top: 1px solid var(--rule); }

.empty { padding: 28px; text-align: center; color: var(--muted); font-size: 14px; }
.foot { margin: 28px 4px 0; color: var(--faint); font-size: 12.5px; line-height: 1.6; }
.foot .k { display: inline-flex; align-items: center; gap: 5px; margin-right: 12px; }
.foot .k i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- login and dialogs ---------- */
.login { display: grid; place-items: center; min-height: 60vh; }
.login-card { width: min(420px, 100%); padding: 26px; display: grid; gap: 12px; }
.login-card h2 { font-size: 20px; }
.login-card p { margin: 0; color: var(--muted); font-size: 14px; }
.login-card input {
  height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--edge); background: var(--page);
  font: 600 17px var(--mono); letter-spacing: .08em; color: var(--ink); text-transform: uppercase;
}
.login-card input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.login-card .btn { justify-content: center; height: 42px; }
.err { color: var(--fail-ink); font-size: 13.5px; margin: 0; }

.dialog { width: min(400px, calc(100vw - 32px)); padding: 22px; color: var(--ink); box-shadow: var(--shadow-window); }
.dialog::backdrop { background: rgba(14,16,20,.32); backdrop-filter: blur(2px); }
.dialog[open] { animation: rise var(--mid) var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.dialog-head h2 { font-size: 18px; }
.x { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.x:hover { background: var(--fill); }
.dialog p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.qr { width: 216px; height: 216px; margin: 6px auto 12px; padding: 12px; background: #fff; border-radius: 12px; border: 1px solid var(--edge); }
.qr svg { width: 100%; height: 100%; display: block; }
.code { text-align: center; font: 600 18px var(--mono); letter-spacing: .1em; color: var(--ink) !important; }
.steps { margin: 0 0 10px; padding-left: 20px; color: var(--ink-2); font-size: 14px; display: grid; gap: 6px; }
.faint { color: var(--faint) !important; font-size: 12.5px !important; text-align: center; margin: 0 !important; }
.row-line { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.row-line b { font-weight: 600; }
.hint { background: var(--fill); border-radius: 10px; padding: 10px 12px; color: var(--ink-2) !important; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--page); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-window); max-width: calc(100vw - 32px); animation: rise var(--mid) var(--ease);
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .wrap { padding-top: max(20px, env(safe-area-inset-top)); }
  .top { align-items: flex-start; margin-bottom: 18px; }
  .top h1 { font-size: 24px; }
  .btn { height: 34px; padding: 0 11px; }
  .bar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .chips { min-width: 0; }
  .specs { white-space: normal; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 0 20px 2px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .seg { align-self: flex-start; }
  .row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    grid-template-areas: "bell main state" ". hist hist";
    row-gap: 8px; column-gap: 10px; padding: 12px 14px 13px 8px;
  }
  .row > .bell { grid-area: bell; align-self: start; margin-top: -2px; }
  .row > .main { grid-area: main; }
  .row > .price { display: none; }
  .row > .hist { grid-area: hist; }
  .row > .state { grid-area: state; align-self: start; }
  .price-inline { display: inline; color: var(--ink-2); font-weight: 600; }
  .configs .row { padding-left: 16px; }
  .configs .note { padding-left: 54px; }
}
