/* The Vietne page (portal/website.js). The column charts, tabs and the visits table come from tracking.css
   (shared with the Custom domains statistics); this file lays the page out: the header, the tag's setup, the totals,
   the ranked tables, the visits by day, one visitor's visits, the skeletons and the motion. One accent: --viz-1, the charts' blue. */
#page-website{
  --rank-bar:color-mix(in srgb,var(--viz-1) 18%,transparent);
  --rank-bar-hover:color-mix(in srgb,var(--viz-1) 28%,transparent);
  --code-bg:#16191f; --code-line:#323844; --code-text:#e6e8ec; --code-dim:#8f97a5; --code-string:#9cc3ff; --code-ok:#7fd6a4;
  --ease-out:cubic-bezier(.16,1,.3,1);
}
:root[data-theme="light"] #page-website{--rank-bar:color-mix(in srgb,var(--viz-1) 9%,transparent);--rank-bar-hover:color-mix(in srgb,var(--viz-1) 16%,transparent);--code-bg:#17191e;--code-line:#2c3038}

/* ── Header: title and the tag's state on the left, period / refresh / "Code and settings" on the right ── */
.website-head{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:16px 24px;margin-bottom:24px}
.website-head-copy{flex:1 1 320px;min-width:0}
#page-website .website-head h2{font-size:28px;line-height:1.15;letter-spacing:-.03em}
.website-lead{max-width:60ch;margin-top:8px;color:var(--muted);font-size:14px;line-height:1.5}
.website-status{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;min-height:22px;margin-top:8px;font-size:13px;line-height:1.4}
.website-status[hidden],.website-lead[hidden],.website-setup[hidden]{display:none}
.website-status-note{color:var(--muted)}
.website-live{display:inline-flex;align-items:center;gap:8px;font-weight:600;white-space:nowrap}
.website-live i{position:relative;width:8px;height:8px;flex:none;border-radius:50%;background:var(--success-text)}
.website-live[data-tone="pending"] i{background:var(--warning-text)}
.website-head-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.website-head-actions:empty{display:none}
.website-period{width:190px}
.website-period .v-control{display:flex;width:100%;min-height:40px;border-radius:10px}
.website-icon-button,.website-setup-button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;flex:none;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text);cursor:pointer;transition:background-color .15s,border-color .15s,scale .15s ease-out;-webkit-tap-highlight-color:transparent}
.website-icon-button{width:40px;padding:0}
.website-icon-button svg,.website-setup-button svg{width:16px;height:16px;flex:none}
.website-setup-button{gap:8px;padding:8px 14px 8px 12px;font:inherit;font-size:13px;font-weight:600;line-height:1.2}
.website-setup-button svg{color:var(--muted)}
.website-setup-button[aria-expanded="true"]{background:var(--panel-2);border-color:var(--dim)}
.website-setup-button[aria-expanded="true"] svg{color:var(--text)}
@media(hover:hover){.website-icon-button:hover,.website-setup-button:hover{background:var(--panel-2);border-color:var(--dim)}}
/* Press feedback for the page's own buttons and tabs: a slight shrink, eased back on release. */
#page-website :is(.website-icon-button:not(#website-refresh),.website-setup-button,.website-create,.tracking-tabs button,.website-example-list button,.website-more):active:not(:disabled){scale:.96}
/* Refresh has no motion: while it fetches, its icon is only dimmed. */
.website-icon-button.is-busy svg{opacity:.4}
.website-icon-button:focus-visible,.website-setup-button:focus-visible{outline:none;border-color:var(--focus);box-shadow:0 0 0 3px var(--focus-soft)}

/* ── Surfaces ── */
.website-panel{min-width:0;padding:20px 24px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
:root[data-theme="light"] :is(.website-panel,.website-overview){box-shadow:0 2px 5px rgba(24,24,24,.025)}
.website-panel-head{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin-bottom:14px}
#page-website .website-panel-head h4{font-size:14px;line-height:1.4;font-weight:600}
.website-panel-head p{margin-top:2px;color:var(--muted);font-size:12px;line-height:1.4}
#page-website .website-panel-title{font-size:16px;line-height:1.3;font-weight:600}
.website-card-empty{color:var(--muted);font-size:13px;line-height:1.5}
.website-section-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 16px;margin-bottom:14px}
#page-website .website-section-head h3{font-size:18px;line-height:1.25;font-weight:600;letter-spacing:-.015em}
.website-block + .website-block{margin-top:16px}

/* ── No tag yet: what it does, and a preview of what it records ── */
.website-setup{margin-bottom:20px}
.website-onboard{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:center;gap:32px 48px;padding:36px 40px}
#page-website .website-onboard h3{font-size:24px;line-height:1.2;letter-spacing:-.025em}
.website-onboard-intro{max-width:54ch;margin-top:10px;color:var(--muted);font-size:14px;line-height:1.6}
.website-onboard-steps{display:grid;gap:10px;margin:22px 0 26px;padding:0;list-style:none;counter-reset:website-onboard}
.website-onboard-steps li{display:flex;align-items:center;gap:12px;font-size:14px;line-height:1.4;font-weight:500;counter-increment:website-onboard}
.website-onboard-steps li::before{content:counter(website-onboard);display:grid;place-items:center;width:24px;height:24px;flex:none;border:1px solid var(--line);border-radius:50%;background:var(--panel-2);font-size:12px;font-weight:600;font-variant-numeric:tabular-nums}
.website-onboard .website-create{width:auto;min-height:44px;padding:12px 18px}
.website-feed{padding:4px 18px 10px;border:1px solid var(--code-line);border-radius:14px;background:var(--code-bg);color:var(--code-text);box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 24px 48px -28px rgba(24,24,24,.45)}
.website-feed-head{display:flex;align-items:center;padding:12px 0;border-bottom:1px solid var(--code-line);font-size:12px}
.website-feed .website-live i{background:var(--code-ok)}
.website-feed ol{min-height:212px;margin:0;padding:6px 0 0;list-style:none}
.website-feed li{position:relative;display:grid;grid-template-columns:64px minmax(0,1fr);gap:10px;padding:10px 0 10px 18px}
.website-feed li::before{content:'';position:absolute;left:0;top:15px;width:8px;height:8px;border-radius:50%;background:var(--code-dim)}
.website-feed li[data-kind="custom"]::before{background:var(--viz-1)}
.website-feed li[data-kind="purchase"]::before{background:var(--code-ok)}
.website-feed time{color:var(--code-dim);font:12px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.website-feed li span{display:grid;gap:1px;min-width:0;font-size:13px;line-height:1.45}
.website-feed small{color:var(--code-dim);font-size:12px;font-variant-numeric:tabular-nums}

/* ── Code and settings: three steps, the copy on the left and the work on the right ── */
.website-setup-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:4px}
.website-steps{margin:0;padding:0;list-style:none;counter-reset:website-step}
.website-step{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,8fr);gap:16px 40px;padding:24px 0;border-bottom:1px solid var(--line);counter-increment:website-step}
.website-step-copy{position:relative;min-width:0;padding-left:40px}
.website-step-copy::before{content:counter(website-step);position:absolute;left:0;top:-2px;display:grid;place-items:center;width:26px;height:26px;border:1px solid var(--line);border-radius:50%;background:var(--panel-2);color:var(--text);font-size:12px;font-weight:600;font-variant-numeric:tabular-nums}
#page-website .website-step h4{font-size:14px;line-height:1.4;font-weight:600}
.website-step-copy p{margin-top:6px;color:var(--muted);font-size:13px;line-height:1.55}
.website-step-work{min-width:0}
/* Code sits on the same dark surface in both themes, with a bar for its language and the Copy button. */
.website-code{min-width:0;overflow:hidden;border:1px solid var(--code-line);border-radius:12px;background:var(--code-bg);color:var(--code-text);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.website-code-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;padding:6px 6px 6px 14px;border-bottom:1px solid var(--code-line)}
.website-code-bar > span{color:var(--code-dim);font:600 11px/1.2 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.06em;text-transform:uppercase}
.website-code pre{margin:0;padding:14px 16px 16px;overflow-x:auto;font:12.5px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}
.website-code code{font:inherit}
.website-tok-tag,.website-tok-attr{color:var(--code-dim)}
.website-tok-string{color:var(--code-string)}
.website-tok-fn{color:#fff;font-weight:600}
.website-code .tracking-copy-button{min-height:32px;padding:6px 10px;border-color:var(--code-line);background:transparent;color:var(--code-text)}
@media(hover:hover){.website-code .tracking-copy-button:hover:not(:disabled){background:rgba(255,255,255,.07);border-color:#4b515d}}
/* Step 2: the examples listed under its text, the chosen one's code on the right. */
.website-example-list{display:grid;gap:2px;margin:14px 0 0 -10px}
.website-example-list button{min-height:36px;padding:8px 10px;border:0;border-radius:8px;background:none;color:var(--muted);font:inherit;font-size:13px;line-height:1.35;text-align:left;cursor:pointer;transition:background-color .15s,color .15s;-webkit-tap-highlight-color:transparent}
@media(hover:hover){.website-example-list button:hover{background:var(--panel-2);color:var(--text)}}
.website-example-list button[aria-pressed="true"]{background:var(--panel-2);color:var(--text);font-weight:600;box-shadow:inset 2px 0 0 var(--text)}
.website-example-list button:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
.website-domains{display:flex;gap:8px;max-width:560px}
.website-domains input{flex:1;min-width:0;min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:9px;background:var(--bg);color:var(--text);font:inherit;font-size:14px}
:root[data-theme="light"] .website-domains input{background:var(--panel)}
@media(hover:hover){.website-domains input:hover{border-color:var(--dim)}}
.website-domains input:focus{outline:none;border-color:var(--focus);box-shadow:0 0 0 3px var(--focus-soft)}
.website-domains .tracking-mini-button{min-height:40px}
.website-hosts{margin-top:10px;color:var(--muted);font-size:12px;line-height:1.8}
.website-hosts code{display:inline-block;padding:0 8px;border:1px solid var(--line);border-radius:999px;background:var(--panel-2);color:var(--text);font:12px/1.6 ui-monospace,monospace}
.website-privacy{display:flex;align-items:flex-start;gap:10px;max-width:90ch;padding-top:20px;color:var(--muted);font-size:12px;line-height:1.55}
.website-privacy svg{width:16px;height:16px;flex:none;margin-top:1px;color:var(--success-text)}

/* ── The totals: a lead figure spanning two rows beside four smaller ones, divided by hairlines ── */
.website-overview{display:grid;grid-template-columns:minmax(0,1.35fr) repeat(2,minmax(0,1fr));gap:1px;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--line)}
.website-tile{display:flex;flex-direction:column;min-width:0;padding:20px 22px;background:var(--panel)}
.website-tile.is-hero{grid-row:span 2;padding:26px 28px;background:linear-gradient(160deg,color-mix(in srgb,var(--viz-1) 7%,var(--panel)),var(--panel) 62%)}
.website-tile-label{color:var(--muted);font-size:12px;line-height:1.4}
.website-tile-value{margin-top:6px;font-size:24px;line-height:1.15;font-weight:600;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.website-tile-note{margin-top:6px;color:var(--muted);font-size:12px;line-height:1.4;font-variant-numeric:tabular-nums}
.is-hero .website-tile-label{color:var(--text);font-size:13px;font-weight:600}
.is-hero .website-tile-value{margin-top:12px;font-size:44px;line-height:1;letter-spacing:-.035em}
/* The facts or the hint sit at the bottom of the tile, at least 28 px under what is above them. */
.website-tile.is-hero > :nth-last-child(2){margin-bottom:28px}
.website-hero-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:auto 0 0;padding-top:16px;border-top:1px solid var(--line)}
.website-hero-facts div{min-width:0}
.website-hero-facts dt{color:var(--muted);font-size:12px;line-height:1.35}
.website-hero-facts dd{margin:4px 0 0;font-size:16px;line-height:1.3;font-weight:600;font-variant-numeric:tabular-nums}
.website-hero-hint{max-width:44ch;margin-top:auto;padding-top:16px;border-top:1px solid var(--line);color:var(--muted);font-size:12px;line-height:1.5}

/* ── Charts: the trend with its metric switch, then hours beside weekdays in one panel ── */
.tracking-tabs button[aria-pressed="true"]{background:var(--panel);color:var(--text);box-shadow:0 1px 2px rgba(24,24,24,.08),0 0 0 1px var(--line)}
@media(hover:hover){.tracking-tabs button[aria-pressed="false"]:hover{color:var(--text)}}
.website-panel.website-rhythm{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);padding:0}
.website-rhythm > section{min-width:0;padding:20px 24px 16px}
.website-rhythm > section + section{border-left:1px solid var(--line)}

/* ── Ranked tables: a bar behind each name, as long as its number is next to the top row's ── */
.website-pair{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:16px}
.website-pair.is-flipped{grid-template-columns:minmax(0,5fr) minmax(0,7fr)}
.website-table-wrap{margin:0 -8px;overflow-x:auto}
.website-rank{width:100%;border-collapse:separate;border-spacing:0 3px;font-size:13px;line-height:1.35}
.website-rank thead th{padding:0 8px 4px;color:var(--muted);font-size:12px;font-weight:600;text-align:right;white-space:nowrap}
.website-rank thead th:first-child{text-align:left}
.website-rank tbody th,.website-rank tbody td{padding:7px 8px;font-weight:400;text-align:right;vertical-align:top;font-variant-numeric:tabular-nums;white-space:nowrap}
.website-rank tbody th{position:relative;width:100%;text-align:left;white-space:normal}
.website-rank tbody th::before{content:'';position:absolute;inset:0 auto 0 0;width:calc(var(--share,0) * 100%);border-radius:6px;background:var(--rank-bar);transform-origin:0 50%}
.website-rank-label{position:relative;display:block;min-width:0}
.website-rank code{font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow-wrap:anywhere}
.website-rank small{display:block;margin-top:2px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.website-rank .tracking-cell-link span{max-width:none;white-space:normal}
.website-cell-main{display:block;overflow-wrap:anywhere}
.website-out{display:inline-block;width:12px;height:12px;margin-left:4px;vertical-align:-1px;color:var(--muted)}
.website-more{display:inline-flex;align-items:center;gap:6px;min-height:32px;margin-top:6px;padding:4px 0;border:0;background:none;color:var(--muted);font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.website-more svg{width:14px;height:14px;transition:transform .2s}
.website-more[aria-expanded="true"] svg{transform:rotate(180deg)}
@media(hover:hover){.website-more:hover{color:var(--text)}}
.website-more:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:4px}

/* ── Statistics without visits ── */
.website-empty{display:flex;align-items:flex-start;gap:16px;padding:28px}
.website-empty-icon{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:12px;background:var(--panel-2);color:var(--muted)}
.website-empty-icon svg{width:22px;height:22px}
#page-website .website-empty h4{font-size:16px;line-height:1.3;font-weight:600}
.website-empty p{max-width:60ch;margin-top:6px;color:var(--muted);font-size:14px;line-height:1.5}
.website-empty .tracking-mini-button{margin-top:14px;min-height:40px}

/* ── Visits, a heading per day ── */
.website-visits-section{margin-top:40px}
#page-website .website-visits-table thead th{background:var(--panel)}
.website-visits-table .website-day th{padding:18px 12px 8px;border-bottom:1px solid var(--line);background:var(--panel);color:var(--text);font-size:13px;font-weight:600;letter-spacing:-.005em}
.website-visits-table tbody:first-of-type .website-day th{padding-top:14px}
.website-visits-table time{font-variant-numeric:tabular-nums}
/* The visitor's id is a button: it opens all of that visitor's visits. */
.website-visitor{position:relative;display:inline-block;padding:0 6px;border:1px solid var(--line);border-radius:6px;background:none;color:var(--muted);font:12px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:nowrap;cursor:pointer;transition:background-color .15s,border-color .15s,color .15s;-webkit-tap-highlight-color:transparent}
/* A larger hit area than the chip itself. */
.website-visitor::before{content:'';position:absolute;inset:-8px -4px}
@media(hover:hover){.website-visitor:hover{border-color:var(--dim);background:var(--panel-2);color:var(--text)}}
.website-visitor:focus-visible{outline:none;border-color:var(--focus);box-shadow:0 0 0 3px var(--focus-soft);color:var(--text)}
.website-badge{display:inline-flex;padding:2px 8px;border:1px solid var(--success-border);border-radius:999px;background:var(--success-bg);color:var(--success-text);font-size:12px;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
.website-visit-detail{display:grid;gap:16px}
/* A visit, step by step: a line down the left with a dot per event; a purchase's dot in the success colour. */
.website-timeline{margin:0;padding:0;list-style:none}
.website-timeline li{position:relative;display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;padding:0 0 12px 18px}
.website-timeline li::before{content:'';position:absolute;left:4px;top:14px;bottom:-2px;width:1px;background:var(--line)}
.website-timeline li:last-child::before{display:none}
.website-timeline li::after{content:'';position:absolute;left:0;top:5px;width:9px;height:9px;border-radius:50%;background:var(--dim)}
.website-timeline li[data-kind="purchase"]::after{background:var(--success-text)}
.website-timeline li[data-kind="custom"]::after{background:var(--viz-1)}
.website-timeline time{color:var(--muted);font-size:12px;line-height:1.5;font-variant-numeric:tabular-nums}
.website-timeline li > div{display:grid;gap:2px;min-width:0;font-size:13px;line-height:1.45}
.website-timeline strong{font-weight:600}
.website-timeline span{overflow-wrap:anywhere}
.website-timeline small{color:var(--muted);font-size:12px;overflow-wrap:anywhere}

/* ── One visitor: the way back over their id, what is known of them, then each visit with its timeline ── */
.website-person-head{display:grid;justify-items:start;gap:4px}
.website-back{display:inline-flex;align-items:center;gap:4px;min-height:32px;margin-left:-4px;padding:4px 8px 4px 4px;border:0;border-radius:8px;background:none;color:var(--muted);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:background-color .15s,color .15s;-webkit-tap-highlight-color:transparent}
.website-back svg{width:16px;height:16px;rotate:90deg}
@media(hover:hover){.website-back:hover{background:var(--panel-2);color:var(--text)}}
.website-back:focus-visible{outline:2px solid var(--focus);outline-offset:0}
#website-visits-title{font-variant-numeric:tabular-nums}
#website-visits-title:focus{outline:none}
.website-person{display:grid;gap:16px}
.website-person-visits{margin:0;padding:0 24px;list-style:none}
.website-person-visit{padding:20px 0 8px}
.website-person-visit + .website-person-visit{border-top:1px solid var(--line)}
.website-person-visit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
.website-person-visit-head > div{min-width:0}
#page-website .website-person-visit-head h4{font-size:14px;line-height:1.4;font-weight:600;font-variant-numeric:tabular-nums}
.website-person-visit-head p{margin-top:2px;color:var(--muted);font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.website-person-note{color:var(--muted);font-size:12px;line-height:1.5}

/* ── Skeletons in the shape of what replaces them ── */
.website-sk{position:relative;display:block;height:12px;overflow:hidden;border-radius:6px;background:var(--panel-2)}
.website-sk-status{width:260px;max-width:100%;height:14px}
.website-sk-panel{display:grid;gap:12px}
.website-sk-value{width:56%;height:40px;margin:16px 0 28px}
.website-sk-number{width:40%;height:22px;margin-top:10px}
.website-skeleton .website-tile.is-hero{background:var(--panel)}
.website-sk-chart{margin-top:16px}
.website-sk-bars{display:flex;align-items:flex-end;gap:6px;height:180px;margin-top:20px}
.website-sk-bars .website-sk{flex:1;border-radius:4px 4px 0 0}
.website-sk-rows{padding:4px 20px}
.website-sk-rows > div{display:grid;grid-template-columns:60px 2fr 1fr 1.5fr;align-items:center;gap:24px;padding:16px 0;border-bottom:1px solid var(--line)}
.website-sk-rows > div:last-child{border-bottom:0}

/* ── Motion: the statistics rise in once, bars grow, the live dot breathes; nothing moves for reduced motion ── */
@media(prefers-reduced-motion:no-preference){
  .website-live[data-tone="ok"] i::after{content:'';position:absolute;inset:0;border-radius:inherit;background:inherit;animation:website-breathe 2.4s var(--ease-out) infinite}
  .website-sk::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--text) 7%,transparent),transparent);transform:translateX(-100%);animation:website-shimmer 1.6s ease-in-out infinite}
  .website-stats.is-entering > .website-block{animation:website-rise .7s var(--ease-out) both;animation-delay:calc(var(--i,0) * 70ms)}
  .website-stats.is-entering .website-rank tbody th::before{animation:website-bar 1s var(--ease-out) both;animation-delay:calc(var(--i,0) * 70ms + 180ms)}
  #page-website :is(.is-entering,.is-switching) .tracking-bar{transform-box:fill-box;transform-origin:50% 100%;animation:website-grow .8s var(--ease-out) both}
  .website-stats.is-entering .tracking-bar{animation-delay:calc(var(--i,0) * 70ms + 120ms)}
  .website-feed li{animation:website-feed 9s var(--ease-out) infinite both;animation-delay:calc(var(--n) * 1.1s)}
  .website-example-list button,.website-more svg{transition-duration:.2s}
  /* Opening and closing: in with a short rise, out softer and quicker with a smaller move (both ease-out). */
  .website-setup .is-opening{animation:website-rise .4s var(--ease-out) both}
  .website-setup .is-closing{animation:website-leave .16s ease-out both}
  .tracking-click-detail.is-opening td > *{animation:website-drop .28s var(--ease-out) both}
  .tracking-click-detail.is-closing td > *{animation:website-leave .16s ease-out both}
  /* New data where old data was: a fade only (a period, a filter, an example, a timeline that arrived late). */
  .website-stats.is-updated > .website-block,.website-visits-section .is-updated .tracking-click-table-wrap,
  .website-step-work.is-updated pre,.website-visit-timeline.is-updated{animation:website-fade .26s ease-out both}
  /* Rows that "Load more" / "All links" added, a few at a time from the top (the stagger stops after ten rows). */
  #page-website tr.is-fresh{animation:website-drop .32s var(--ease-out) both;animation-delay:calc(min(var(--r,0), 10) * 22ms)}
  /* Interactive state changes are transitions, so a quick second click turns them around mid-way. */
  .tracking-tabs[data-pill] .website-tabs-pill{transition:translate .32s var(--ease-out),width .32s var(--ease-out),height .32s var(--ease-out)}
  #page-website .tracking-tabs button,.website-example-list button,.website-more{transition-property:background-color,color,box-shadow,scale;transition-duration:.15s;transition-timing-function:ease-out}
  .website-rank tbody th::before{transition:background-color .15s ease-out}
}
/* The pressed tab is shown by one pill that slides between the buttons (portal/website.js syncPills). */
#page-website .tracking-tabs{position:relative;isolation:isolate}
.website-tabs-pill{position:absolute;top:0;left:0;z-index:-1;width:var(--w,0);height:var(--h,0);translate:var(--x,0) var(--y,0);border-radius:8px;pointer-events:none}
#page-website .tracking-tabs:has(.website-tabs-pill) button[aria-pressed="true"]{background:transparent;box-shadow:none}
/* The same look as the Home period switch (dashboard.css .home-range): a grey track and a white thumb, no border. */
#page-website .tracking-tabs{gap:4px;padding:4px;border:0;border-radius:12px;background:#ededeb}
#page-website .tracking-tabs button{min-height:0;padding:8px 12px;border-radius:8px;font-size:12px}
#page-website .tracking-tabs button[aria-pressed="true"]{color:#181818}
#page-website .tracking-tabs button[aria-pressed="true"],.website-tabs-pill{background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.08),0 1px 6px rgba(0,0,0,.05)}
:root[data-theme="dark"] #page-website .tracking-tabs{background:var(--panel-2)}
:root[data-theme="dark"] #page-website .tracking-tabs button[aria-pressed="true"]{color:#f5f7fa}
:root[data-theme="dark"] :is(#page-website .tracking-tabs:not(:has(.website-tabs-pill)) button[aria-pressed="true"],.website-tabs-pill){background:#3a4250;box-shadow:0 1px 2px rgba(0,0,0,.35),0 1px 6px rgba(0,0,0,.2)}
@media(forced-colors:active){#page-website .tracking-tabs button[aria-pressed="true"]{outline:2px solid Highlight;outline-offset:-2px}}
/* A ranked row under the pointer: its bar a little stronger, to follow the row across to its numbers. */
@media(hover:hover){.website-rank tbody tr:hover th::before{background:var(--rank-bar-hover)}}
@keyframes website-breathe{0%{transform:scale(1);opacity:.55}70%,100%{transform:scale(3.2);opacity:0}}
@keyframes website-shimmer{to{transform:translateX(100%)}}
@keyframes website-rise{from{opacity:0;transform:translateY(10px)}}
@keyframes website-bar{from{transform:scaleX(0)}}
@keyframes website-grow{from{transform:scaleY(0)}}
@keyframes website-feed{0%,3%{opacity:0;transform:translateY(8px)}10%,82%{opacity:1;transform:none}92%,100%{opacity:0;transform:translateY(-4px)}}
@keyframes website-drop{from{opacity:0;transform:translateY(-4px)}}
@keyframes website-leave{to{opacity:0;transform:translateY(-4px)}}
@keyframes website-fade{from{opacity:0}}
@media(prefers-reduced-motion:reduce){
  .website-more svg,.website-icon-button,.website-setup-button{transition:none}
  #page-website :is(.website-icon-button:not(#website-refresh),.website-setup-button,.website-create,.tracking-tabs button,.website-example-list button,.website-more):active:not(:disabled){scale:none}
}

@media(max-width:1000px){
  .website-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
  .website-tile.is-hero{grid-column:1/-1;grid-row:auto}
  .website-pair,.website-pair.is-flipped{grid-template-columns:minmax(0,1fr)}
  .website-step{grid-template-columns:minmax(0,1fr);gap:16px}
  .website-onboard{grid-template-columns:minmax(0,1fr);padding:28px}
}
@media(max-width:700px){
  .website-head{align-items:stretch}
  .website-head-actions{width:100%}
  .website-period{flex:1 1 160px;width:auto}
  .website-panel{padding:16px}
  .website-panel.website-rhythm{grid-template-columns:minmax(0,1fr)}
  .website-rhythm > section{padding:16px 16px 12px}
  .website-rhythm > section + section{border-left:0;border-top:1px solid var(--line)}
  .website-person-visits{padding:0 16px}
  .website-person-visit{padding-top:16px}
  .website-tile{padding:16px}
  .website-tile.is-hero{padding:20px}
  .is-hero .website-tile-value{font-size:36px}
  .website-tile-value{font-size:20px}
  .website-hero-facts{gap:8px}
  .website-example-list{display:flex;gap:6px;margin-left:0;padding-bottom:4px;overflow-x:auto;scrollbar-width:none}
  .website-example-list button{flex:none;min-height:34px;padding:6px 12px;border:1px solid var(--line);border-radius:999px;white-space:nowrap}
  .website-example-list button[aria-pressed="true"]{border-color:var(--text);box-shadow:none}
  .website-step-copy{padding-left:36px}
  .website-onboard{gap:28px;padding:22px 20px}
  .website-empty{padding:20px}
  /* A ranked row: the name and its bar on top, the numbers under it with their column names. */
  .website-rank thead{display:none}
  .website-rank,.website-rank tbody{display:block}
  .website-rank tbody tr{display:grid;grid-template-columns:repeat(auto-fit,minmax(64px,1fr));gap:2px 12px;padding:3px 0 9px}
  .website-rank tbody th{grid-column:1/-1}
  .website-rank tbody td{padding:0 8px;text-align:left}
  .website-rank tbody td::before{content:attr(data-label);display:block;color:var(--muted);font-size:11px;line-height:1.4;white-space:nowrap}
  .website-visits-table .website-day{display:block}
  .website-visits-table .website-day th{display:block;padding:14px 16px 8px}
  .website-timeline li{grid-template-columns:minmax(0,1fr);gap:0}
  .website-sk-rows > div{grid-template-columns:1fr 1fr}
}
/* Phones: "Code and settings" keeps its name for screen readers but shows only its icon, so the row fits. */
@media(max-width:480px){
  .website-setup-button{width:40px;padding:0}
  .website-setup-button span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
