/* AquaMatter public site. Palette and fonts follow the app design (issue #5).
   Fonts are self-hosted (SIL OFL, see assets/fonts/README.md) so visitors' browsers
   never contact a third party. */
@font-face {
  font-family: 'Figtree';
  src: url('/assets/fonts/Figtree-latin.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/BricolageGrotesque-latin.woff2') format('woff2');
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --primary: #1565C0;
  --primary-dark: #0B3D7A;
  --ink: #0F2440;
  --muted: #4A5C73;
  --line: #C8D5E6;
  --tint: #EEF4FB;
  --background: #FFFFFF;
  --draft: #A2451A;
  --draft-background: #FDF1EB;
  --banner-background: #FFF6E5;
  --banner-border: #E0A030;
  --banner-ink: #5A3A00;
  --body-ink: #24364F;
  --card-title: #000000;
  --card-subtitle: #67768A;
  --social-ink: #34465E;
  --card-body: #222222;
  --section-alt: #F6F9FD;
  --on-primary: #FFFFFF;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231565C0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* Dark colours follow the system; the shared tank page also has a light/dark switch (mock v609) that sets
   data-theme on <html>, which wins over the system setting. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #7FB3F0;
    --primary-dark: #A9CCF5;
    --ink: #E6EEF8;
    --muted: #A6B6CA;
    --line: #2A3D57;
    --tint: #13243A;
    --background: #0B1828;
    --draft: #F2A27E;
    --draft-background: #2A1A12;
    --banner-background: #2A1F0A;
    --banner-border: #B9852A;
    --banner-ink: #F3D9A6;
    --body-ink: #C9D6E6;
    --card-title: #E6EEF8;
    --card-subtitle: #A6B6CA;
    --social-ink: #AFB5BD;
    --card-body: #C9D6E6;
    --section-alt: #0F2033;
    --on-primary: #0B1828;
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237FB3F0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] {
  --primary: #7FB3F0;
  --primary-dark: #A9CCF5;
  --ink: #E6EEF8;
  --muted: #A6B6CA;
  --line: #2A3D57;
  --tint: #13243A;
  --background: #0B1828;
  --draft: #F2A27E;
  --draft-background: #2A1A12;
  --banner-background: #2A1F0A;
  --banner-border: #B9852A;
  --banner-ink: #F3D9A6;
  --body-ink: #C9D6E6;
  --card-title: #E6EEF8;
  --card-subtitle: #A6B6CA;
  --social-ink: #AFB5BD;
  --card-body: #C9D6E6;
  --section-alt: #0F2033;
  --on-primary: #0B1828;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237FB3F0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* Page changes keep the old page on screen until the next one is ready (no white flash), in browsers that support it (#1031). */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: 400 17px/1.6 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-dark); }

h1, h2, h3 {
  font-family: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  line-height: 1.2;
  color: var(--ink);
}
h1 { font-size: clamp(30px, 6vw, 42px); margin: 0 0 8px; }
h2 { font-size: 24px; margin: 40px 0 8px; scroll-margin-top: 80px; }
h3 { font-size: 18px; margin: 24px 0 4px; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 16px; top: 8px; z-index: 10; background: var(--background); padding: 8px 12px; }

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  max-width: 880px; margin: 0 auto; padding: 18px 16px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font: 700 20px 'Bricolage Grotesque', sans-serif;
  color: var(--ink); text-decoration: none;
}
/* Bigger logo on every page (mock v609): 56 px, 52 px in the shared tank page's 84 px bar, 40 px on phones there. */
.brand img { flex: none; display: block; height: 56px; width: auto; }
.site-header nav { display: flex; gap: 0 8px; margin-left: auto; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; min-height: 44px; padding: 0 12px; display: flex; align-items: center; }
/* Phones: the header scrolls away with the page; "Get the app" sits beside
   the logo and the other links share an evenly spaced row below. */
@media (max-width: 640px) {
  body:not(.shared-tank) .site-header { position: static; }
  body:not(.shared-tank) .site-header .bar { padding-top: 12px; padding-bottom: 12px; gap: 0; }
  body:not(.shared-tank) .site-header .bar::after { content: ""; order: 1; flex-basis: 100%; height: 8px; }
  body:not(.shared-tank) .brand img { height: 44px; }
  body:not(.shared-tank) .site-header nav { display: contents; }
  body:not(.shared-tank) .site-header nav a { order: 2; flex: 1 1 28%; justify-content: center; padding: 0; }
  body:not(.shared-tank) .site-header nav a.nav-button { order: 1; flex: none; margin-left: auto; padding: 0 16px; }
}
.site-header nav a[aria-current="page"], .site-header nav a:hover { color: var(--primary); }
.site-header nav a.nav-button { background: var(--primary); color: var(--on-primary); border-radius: 12px; padding: 0 18px; margin-left: 8px; }
.site-header nav a.nav-button:hover { background: var(--primary-dark); color: var(--on-primary); }

main:focus { outline: none; }
main { max-width: 880px; margin: 0 auto; padding: 32px 16px 64px; }
main p, main li { line-height: 1.65; }

.meta { color: var(--muted); font-size: 15px; margin: 0 0 24px; }

.draft-banner {
  border: 1px solid var(--banner-border); background: var(--banner-background); color: var(--banner-ink);
  border-radius: 12px; padding: 14px 16px; margin: 0 0 20px; font-size: 15px; line-height: 1.5;
}
.draft-banner strong { color: inherit; }

.language-notice {
  border: 1px solid var(--line); background: var(--tint); color: var(--ink);
  border-radius: 14px; padding: 14px 16px; margin: 0 0 24px; font-size: 15px;
}
main > .language-notice:last-child { margin: 32px 0 0; }

.placeholder { background: var(--draft-background); color: var(--draft); border-radius: 4px; padding: 0 4px; font-weight: 600; }

.table-of-contents {
  background: var(--background); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin: 0 0 8px;
}
.table-of-contents ol { margin: 8px 0 0; padding-left: 24px; font-size: 16px; column-count: 2; column-gap: 32px; }
.table-of-contents li { margin: 2px 0; break-inside: avoid; }
.table-of-contents li a { display: inline-block; min-height: 32px; line-height: 32px; }
@media (max-width: 640px) { .table-of-contents ol { column-count: 1; } }

.summary {
  background: var(--tint); border-radius: 16px; padding: 18px 20px; margin: 0 0 20px; font-size: 16px; line-height: 1.55;
}
.summary-note { margin: 8px 0 4px; font-size: 15px; line-height: 1.5; color: var(--body-ink); font-style: italic; }
.summary-more { white-space: nowrap; font-size: 14px; }
.summary ul { margin: 8px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 700; }
.table-wrap { overflow-x: auto; }

details {
  border: 1px solid var(--line); border-radius: 16px; background: var(--background); padding: 0; margin: 8px 0; overflow: hidden;
}
details[open] { border-color: var(--primary); }
/* Question card (mock v587): native marker hidden, chevron on the right turns when open, CSS only (#942). */
summary {
  cursor: pointer; font-weight: 600; font-size: 17px; line-height: 1.4; text-align: left; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; padding: 12px 16px 12px 20px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 22px; height: 22px;
  background: var(--chevron) center / 22px 22px no-repeat; transition: transform 0.15s ease;
}
details[open] > summary::after { transform: rotate(180deg); }
details > :not(summary) { margin-left: 20px; margin-right: 20px; font-size: 16px; line-height: 1.55; color: var(--body-ink); }
details > :last-child { margin-bottom: 18px; }
@media (prefers-reduced-motion: reduce) { summary::after { transition: none; } }

.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
.store-badge {
  text-decoration: none;
  min-height: 56px; padding: 8px 22px 8px 16px; border-radius: 14px; background: #0F2440; color: #FFFFFF;
  display: flex; align-items: center; gap: 12px;
}
.store-badge svg { flex: none; }
.store-badge span { display: flex; flex-direction: column; justify-content: center; font-size: 12px; color: #C7DEF8; }
.store-badge strong { font-size: 18px; font-weight: 700; color: #FFFFFF; }
.store-note { margin: 0; font-size: 14px; color: var(--muted); }

/* Home page (mock v817 board 15, #1503): photo hero with app screenshots, feature strip, feature cards,
   plans, dark closing band and footer. Content 1120px wide. */
.home .site-header .bar, .home .site-footer .bar { max-width: 1120px; padding-left: 24px; padding-right: 24px; }
.home main { max-width: none; padding: 0; }
.home { overflow-x: hidden; }
.home main h1, .home main h2, .home main h3 { margin: 0; line-height: 1.15; }
.home main section[id] { scroll-margin-top: 100px; }
.home-wrap { max-width: 1120px; margin: 0 auto; padding: 88px 24px; }
/* Hero: photo is decoration, so the hero colours stay dark in both themes. */
.home-hero { position: relative; color: #FFFFFF; background: #071A33; overflow: hidden; isolation: isolate; }
.home-hero::before { content: ""; position: absolute; inset: 0; background: url(/assets/home/underwater.webp) center 30% / cover no-repeat; z-index: -2; }
.home-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(7,26,51,.92) 0%, rgba(7,26,51,.7) 45%, rgba(7,26,51,.15) 100%), linear-gradient(0deg, #071A33 0%, rgba(7,26,51,0) 30%); }
.hero-inner { max-width: 1120px; margin: 0 auto; padding: 64px 24px 56px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.hero-kicker { display: inline-flex; gap: 8px; align-items: center; font-size: 16px; font-weight: 700; color: #7CC4FF; background: rgba(124,196,255,.12); border: 1px solid rgba(124,196,255,.3); padding: 6px 12px; border-radius: 999px; margin-bottom: 20px; }
.home-hero h1 { color: #FFFFFF; font-size: clamp(38px, 4.6vw, 58px); letter-spacing: -1px; }
.home-hero h1 em { font-style: normal; color: #7CC4FF; }
.hero-text > p { font-size: 19px; color: #D6E6F8; max-width: 520px; margin: 20px 0 28px; }
.home-hero .store-badges { margin: 0; }
.home-hero .store-badge { background: #FFFFFF; color: #0F2440; padding: 8px 18px 8px 14px; border-radius: 16px; }
.home-hero .store-badge svg[fill="#FFFFFF"] { fill: #0F2440; }
.home-hero .store-badge span { white-space: nowrap; line-height: 1.2; color: #4A5C73; }
.home-hero .store-badge strong { font-size: 17px; color: #0F2440; }
.home-hero .store-note { font-size: 15px; color: #A9C6E6; margin: 14px 0 0; }
.hero-phones { position: relative; height: 800px; }
/* Galaxy S25 Ultra style frame: flat edge, near-square corners, thin even bezel, centred punch-hole. */
.device { position: relative; border-radius: 16px; background: #050608; padding: 6px; box-shadow: 0 0 0 2px #1A1C20, 0 30px 60px rgba(0,0,0,.45); }
.device::before { content: ""; position: absolute; right: -4px; top: 22%; width: 3px; height: 12%; border-radius: 0 2px 2px 0; background: #1A1C20; }
.device::after { content: ""; position: absolute; left: 50%; top: 11px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #000000; box-shadow: 0 0 0 1.5px #111111; }
.device img { display: block; width: 100%; height: auto; border-radius: 11px; }
.hero-phones .device { position: absolute; width: 290px; }
.hero-phones .device-main { left: 50%; transform: translateX(-50%); top: 10px; z-index: 2; width: 340px; }
.hero-phones .device-left { left: 0; top: 100px; transform: rotate(-7deg); opacity: .92; }
.hero-phones .device-right { right: 0; top: 100px; transform: rotate(7deg); opacity: .92; }
/* Feature strip under the hero. */
.feature-strip { background: #071A33; color: #C7DEF8; }
.feature-strip ul { max-width: 1160px; margin: 0 auto; padding: 22px 24px 34px; list-style: none; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: center; font-weight: 600; font-size: 17px; }
.feature-strip li { display: flex; gap: 8px; align-items: center; }
.feature-strip li::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: #7CC4FF; }
.section-intro { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-intro h2 { font-size: clamp(30px, 3.6vw, 42px); }
.section-intro p { color: var(--muted); margin: 12px 0 0; }
/* Feature cards. */
.home-alt { background: var(--section-alt); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.feature-card { background: var(--background); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; }
.feature-icon { display: inline-flex; width: 44px; height: 44px; border-radius: 14px; background: var(--tint); color: var(--primary); align-items: center; justify-content: center; margin-bottom: 8px; }
.home main .feature-card h3 { font: 700 18px 'Figtree', sans-serif; color: var(--card-title); }
.feature-subtitle { font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--card-subtitle); margin: 4px 0 0; }
.feature-card p { color: var(--card-body); font-size: 15px; line-height: 1.5; margin: 12px 0 0; }
.soon-tag { white-space: nowrap; font-family: 'Figtree', sans-serif; font-size: 12px; font-weight: 700; color: #7A4A00; background: #FFF1CC; padding: 2px 8px; border-radius: 8px; vertical-align: middle; margin-left: 4px; }
/* Plans. */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 880px; margin: 0 auto; }
.plan { border-radius: 24px; padding: 32px; border: 1px solid var(--line); background: var(--background); }
.home main .plan h3 { font-size: 28px; }
.plan-club { background: linear-gradient(160deg, #0B2A52, #071A33); color: #FFFFFF; border: none; box-shadow: 0 20px 40px rgba(7,26,51,.25); }
.home main .plan-club h3 { color: #FFFFFF; }
.plan-price { color: #7CC4FF; font-weight: 600; margin: 6px 0 0; }
.plan-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.plan-list li { display: flex; gap: 10px; }
.plan-list li::before { content: "\2713"; color: var(--primary); font-weight: 700; }
.plan-club .plan-list li::before { color: #7CC4FF; }
.plan-item-badge { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.plan-note { text-align: center; color: var(--muted); font-size: 15px; margin: 20px auto 0; max-width: 640px; }
/* Closing band: privacy and help on the underwater photo. */
.home-closing { position: relative; color: #FFFFFF; background: #071A33; isolation: isolate; overflow: hidden; }
.home-closing::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7,26,51,.88), rgba(7,26,51,.7)), url(/assets/home/underwater.webp) center 85% / cover no-repeat; }
.home-closing .home-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.home main .home-closing h2 { color: #FFFFFF; font-size: 28px; margin-bottom: 10px; }
.home-closing p { color: #D6E6F8; margin: 0; }
.home-closing a { color: #FFFFFF; font-weight: 600; }
.home .site-footer { background: #050F1F; color: #A9BCD3; border-top: none; }
.home .site-footer .bar { padding-top: 22px; padding-bottom: 34px; }
.home .site-footer a { color: #C7DEF8; }
@media (min-width: 1320px) {
  .hero-phones { margin-right: -110px; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 40px; }
  .hero-phones { height: 690px; width: 100%; max-width: 640px; margin: 0 auto; }
  .hero-phones .device { width: 250px; }
  .hero-phones .device-main { width: 300px; }
}
@media (max-width: 640px) {
  .home .site-header .bar, .home .site-footer .bar { padding-left: 16px; padding-right: 16px; }
  .home main section[id] { scroll-margin-top: 16px; }
  .hero-inner, .home-wrap { padding-left: 16px; padding-right: 16px; }
  .hero-text > p { font-size: 17px; }
  .home-hero .store-badge { flex: 1 1 150px; }
  .hero-phones { height: 440px; width: auto; margin: 0 -16px; overflow: hidden; }
  .hero-phones .device { width: 150px; border-radius: 12px; padding: 4px; }
  .hero-phones .device img { border-radius: 8px; }
  .hero-phones .device::after { top: 8px; width: 6px; height: 6px; margin-left: -3px; }
  /* All three phones fully on screen, side ones spread out (2026-10-22). */
  .hero-phones .device-main { width: 180px; top: 6px; }
  .hero-phones .device-left { left: 8px; top: 50px; transform: rotate(-5deg); }
  .hero-phones .device-right { right: 8px; top: 50px; transform: rotate(5deg); }
  .home-wrap { padding-top: 64px; padding-bottom: 64px; }
  .plans, .home-closing .home-wrap { grid-template-columns: 1fr; }
  .site-header nav a.nav-button { margin-left: 0; }
}

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer .bar { max-width: 880px; margin: 0 auto; padding: 20px 16px 32px; display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.language-switch { display: inline-flex; gap: 12px; flex-wrap: wrap; }
.language-switch a[aria-current] { color: inherit; font-weight: 700; text-decoration: none; }

/* Chinese pages (#1518): the self-hosted fonts are Latin only, so name good system fonts for the Chinese text. */
html:lang(zh-Hant) { font-family: 'Figtree', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', system-ui, sans-serif; }
html:lang(zh-Hans) { font-family: 'Figtree', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif; }
:lang(zh-Hant) :is(h1, h2, h3) { font-family: 'Bricolage Grotesque', 'Figtree', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', system-ui, sans-serif; }
:lang(zh-Hans) :is(h1, h2, h3) { font-family: 'Bricolage Grotesque', 'Figtree', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif; }
:lang(zh) .home-hero h1 { letter-spacing: 0; font-size: clamp(34px, 4.2vw, 52px); }

/* FAQ page: search, topic chips, welcome card (#870). */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.faq-search { margin: 16px 0 12px; }
.faq-search-row { display: flex; gap: 8px; }
.faq-search input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 16px;
  font: inherit; color: var(--ink); background: var(--background);
  border: 1px solid var(--muted); border-radius: 14px;
}
.faq-search input::placeholder { color: var(--muted); opacity: 1; }
.faq-search input:focus-visible, .faq-search button:focus-visible, .topic-chips a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--primary); outline-offset: 2px;
}
.faq-search button {
  min-height: 48px; min-width: 64px; padding: 0 16px; font: 600 16px 'Figtree', sans-serif;
  color: var(--primary); background: var(--tint); border: 1px solid var(--line); border-radius: 14px; cursor: pointer;
}
.faq-search-status { margin: 6px 4px 0; min-height: 1.6em; color: var(--muted); font-size: 15px; }
.faq-no-results { margin: 0 0 16px; padding: 12px 16px; background: var(--tint); border-radius: 14px; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.topic-chips a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  background: var(--tint); color: var(--primary); border: 1px solid var(--line); border-radius: 22px;
  font-weight: 600; font-size: 15px; text-decoration: none;
}
.topic-chips a:hover { color: var(--primary-dark); border-color: var(--primary); }
.faq-intro { background: var(--tint); border-radius: 14px; padding: 4px 16px; margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
.faq-intro p { margin: 10px 0; }
details[id] { scroll-margin-top: 120px; }

/* Shared tank page /t/<code> (#1125, mock board 17d): photos left, the rest on the right; one column on phones. */
.shared-tank .site-header .bar, .shared-tank .site-footer .bar { max-width: 1184px; padding-left: 24px; padding-right: 24px; }
.shared-tank main { max-width: 1184px; padding: 32px 24px 64px; }
.shared-tank [hidden] { display: none !important; }
.shared-tank h2 { margin: 0; font: 700 20px 'Figtree', sans-serif; }
.nav-text { color: var(--muted); font-size: 15px; display: flex; align-items: center; min-height: 44px; padding: 0 4px; }
.shared-status { color: var(--muted); }
.shared-message { max-width: 640px; }
.text-button {
  min-height: 44px; border: none; background: transparent; padding: 0; cursor: pointer;
  color: var(--primary); font: 600 15px 'Figtree', sans-serif; text-align: left;
}
.text-button:hover { color: var(--primary-dark); }
.text-button:focus-visible, .photo-tile:focus-visible, .nav-button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.shared-heading { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 0 0 24px; }
.shared-title { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.shared-title h1 { margin: 0; font-size: 40px; overflow-wrap: anywhere; }
.shared-owner { font-size: 14px; font-weight: 600; color: var(--muted); }
.shared-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 10px; background: var(--tint); color: var(--body-ink); }
.chip-water { background: #D6E6F5; color: #1F4E79; }
.shared-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.no-photos .shared-columns { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.shared-photos, .shared-side, .shared-side > section { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.shared-side { gap: 24px; }
/* Photos and videos (17d computer, 17e phone): count, filter chips, then a grid that loads more as it scrolls. On a
   computer the page scrolls (no inner box, so the mouse wheel works); on a phone the grid is its own ~300px box. */
.photos-heading { display: flex; align-items: baseline; gap: 12px; }
.photo-count { font-size: 15px; color: var(--muted); }
.photo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-chip {
  flex: none; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--background);
  color: var(--ink); font: 600 14px 'Figtree', sans-serif; display: flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer;
}
.photo-chip-count { font-size: 12px; font-weight: 700; color: var(--card-subtitle); }
.photo-chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.photo-chip[aria-pressed="true"] .photo-chip-count { color: var(--on-primary); opacity: 0.8; }
.photo-chip:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.photo-loading {
  height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--muted);
}
.photo-loading[hidden] { display: none; }
.photo-tile {
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: none; cursor: pointer;
  border-radius: 14px; overflow: hidden; background: var(--tint);
}
.photo-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Tile chips like the app's tank grid (mock #2066): date top-left, video length top-right, tagged nicknames bottom-left.
   The same colours in both themes. shared-tank.js shrinks them to fit (11 px down to 9 px). */
.tile-top {
  position: absolute; left: 6px; right: 6px; top: 6px; display: flex; justify-content: space-between; align-items: flex-start;
  gap: 4px; pointer-events: none;
}
.tile-chip {
  font: 600 11px 'Figtree', sans-serif; line-height: 1.3; background: rgba(255, 255, 255, 0.85); color: #0F2440;
  padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; box-sizing: border-box; text-align: left;
}
.tile-date { min-width: 0; }
.tile-length {
  flex: none; margin-left: auto; display: flex; align-items: center; gap: 3px; white-space: nowrap;
  font: 700 11px 'Figtree', sans-serif; line-height: 1.3; color: #FFFFFF; background: rgba(15, 36, 64, 0.7); padding: 2px 6px; border-radius: 6px;
}
.tile-length svg { flex: none; }
.tile-names { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); text-overflow: ellipsis; pointer-events: none; }
/* Still too long at 9 px: the whole tile width, up to three lines broken anywhere, then "…". */
.tile-names.tile-names-wrap {
  width: calc(100% - 12px); white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  line-height: 1.25; word-break: break-all; font-size: 9px !important;
}
/* Full-page photo viewer (17d desktop, 17e phone). Always dark, like the app's viewer. */
body.viewer-open { overflow: hidden; }
.photo-viewer {
  position: fixed; inset: 0; z-index: 50; background: #0A1626; color: #FFFFFF;
  display: flex; flex-direction: column; gap: 16px; padding: 20px 32px 24px;
}
.photo-viewer[hidden] { display: none; }
.viewer-top { display: flex; align-items: center; gap: 16px; }
.viewer-caption { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.viewer-owner { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.viewer-meta { font-size: 14px; color: #C9D6E6; }
.viewer-close, .viewer-step {
  flex: none; border: none; color: #FFFFFF; background: rgba(255, 255, 255, 0.16); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.viewer-close { width: 48px; height: 48px; border-radius: 24px; }
.viewer-step { width: 56px; height: 56px; border-radius: 28px; }
.viewer-step[hidden] { display: none; }
.viewer-close:hover, .viewer-step:hover { background: rgba(255, 255, 255, 0.28); }
.viewer-stage { flex: 1; min-height: 0; display: flex; align-items: center; gap: 24px; }
.viewer-image { flex: 1; min-width: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 16px; }
.viewer-bottom { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.viewer-strip { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 2px; }
.viewer-strip[hidden] { display: none; }
.viewer-thumb {
  /* Never squeezed (Cyrus 2026-11-03 "looks so squzze", mock #2063): the strip scrolls sideways instead. */
  flex: none; flex-shrink: 0; width: 88px; min-width: 88px; height: 64px; padding: 0; border: 3px solid transparent; border-radius: 10px; overflow: hidden;
  background: #13243A; opacity: 0.6; cursor: pointer;
}
.viewer-thumb[aria-selected="true"] { border-color: #FFFFFF; opacity: 1; }
.viewer-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.viewer-hint { font-size: 14px; color: #C9D6E6; }
.viewer-hint-phone { display: none; }
/* Heart and like count (mock v607): top row on desktop, beside the strip hint on phones. */
.viewer-like {
  flex: none; height: 48px; padding: 0 14px; border: none; border-radius: 22px; background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF; display: flex; align-items: center; gap: 8px; font: 600 15px 'Figtree', sans-serif; cursor: pointer;
}
.viewer-like:hover { background: rgba(255, 255, 255, 0.28); }
.viewer-like[hidden] { display: none; }
.viewer-like svg { flex: none; }
.viewer-like-note { font-size: 14px; color: #FFFFFF; }
.viewer-like-note:empty { display: none; }
.viewer-like-row { display: none; }
.viewer-phone-only { display: none; }
.photo-viewer button:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }
.photo-tile:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.open-in-app-icon { display: none; }
.shared-list { list-style: none; margin: 0; padding: 0; background: var(--background); border: 1px solid var(--line); border-radius: 16px; }
.shared-list li { min-height: 52px; padding: 8px 18px; margin: 0; display: flex; align-items: center; gap: 12px; }
.shared-list li + li { border-top: 1px solid var(--line); }
.shared-list-label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shared-list-name { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.shared-list-detail { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.shared-list-value { font-size: 15px; color: var(--muted); white-space: nowrap; }
.shared-list-cost { min-width: 44px; text-align: right; }
.shared-list-count { font-weight: 500; color: var(--muted); white-space: nowrap; }
.shared-list-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.shared-cost-heading { padding-right: 18px; font-size: 13px; font-weight: 600; color: var(--muted); }
/* Measurement graph tiles with the 1W / 1M / 3M switch (#1146, mock v601). */
.section-heading-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.range-switch { display: flex; background: var(--tint); border-radius: 12px; padding: 3px; }
.range-switch button {
  height: 40px; min-width: 44px; padding: 0 10px; border: none; border-radius: 9px; background: transparent;
  color: var(--muted); font: 600 13px 'Figtree', sans-serif; cursor: pointer;
}
.range-switch button[aria-pressed="true"] { background: var(--background); color: var(--primary); }
.measurement-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.measurement-tile { background: var(--background); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.measurement-name { font-size: 14px; font-weight: 700; }
.measurement-latest { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.measurement-value { font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.measurement-unit, .measurement-empty { font-size: 13px; color: var(--muted); }
.measurement-graph { display: block; }
.measurement-graph-background { fill: var(--section-alt); }
.measurement-graph-line { stroke: var(--primary); }
.measurement-axis { display: flex; justify-content: space-between; gap: 4px; font-size: 12px; color: var(--muted); }
/* Report a problem at the bottom of the page, with the reason (#1146, mock v601). */
.report-section { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.report-button { align-self: flex-start; display: flex; align-items: center; gap: 8px; }
.report-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-question { font-size: 15px; font-weight: 700; margin-right: 6px; }
.report-reasons { display: flex; flex-wrap: wrap; gap: 10px; }
.report-reasons button {
  min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--background);
  color: var(--ink); font: 500 15px 'Figtree', sans-serif; cursor: pointer;
}
.report-reasons button[aria-checked="true"] { border-color: var(--primary); background: var(--tint); }
.report-send {
  min-height: 44px; padding: 0 18px; border: none; border-radius: 22px; background: var(--primary);
  color: var(--on-primary); font: 600 15px 'Figtree', sans-serif; cursor: pointer;
}
.report-send:disabled { opacity: 0.6; cursor: default; }
.report-actions { display: contents; }
.report-cancel { display: none; }
.report-error { font-size: 15px; color: var(--draft); }
.report-error:empty { display: none; }
.report-status { font-size: 15px; color: var(--body-ink); }
.report-status:empty { display: none; }
.range-switch button:focus-visible, .report-reasons button:focus-visible, .report-send:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.get-app-card { background: var(--section-alt); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.get-app-card h2 { font-size: 17px; }
.get-app-card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--body-ink); }
.get-app-card .store-badges { margin: 4px 0 0; gap: 10px; }
/* Both badges the same size on board 17d (200 x 60, #1146). */
.get-app-card .store-badge { width: 200px; height: 60px; min-height: 0; padding: 0 14px; border-radius: 12px; gap: 10px; }
.get-app-card .store-badge svg { width: 26px; height: 26px; }
.get-app-card .store-note { color: var(--muted); }
/* Tank invite page /j/<code> (#1245): the invite on the left, the get-the-app card on the right; one column on phones. */
.invite-columns { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.invite-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: var(--tint); color: var(--primary); margin: 0 0 16px; }
.invite-message h1 { margin: 0 0 12px; font-size: 40px; }
.invite-message p { margin: 0 0 16px; font-size: 17px; line-height: 1.5; color: var(--body-ink); }
.invite-points { margin: 0; padding-left: 20px; color: var(--body-ink); font-size: 15px; line-height: 1.6; }
@media (max-width: 800px) {
  .shared-columns, .invite-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .shared-tank main { padding: 24px 16px 48px; }
  .shared-tank .site-header .bar, .shared-tank .site-footer .bar { padding-left: 16px; padding-right: 16px; }
  .shared-title h1, .invite-message h1 { font-size: 30px; }
  .shared-tank .nav-text { display: none; }
}
/* Phone web (board 17e, under 600 px): wordmark-only header, a floating "Open in the app" pill, every photo in three
   columns, the viewer full screen with its bar over the photo, Report a problem as a sheet with a toast after. */
@media (max-width: 599px) {
  .shared-tank main { padding-bottom: 100px; }
  /* The header's blur would make it the box the fixed pill sits in; without it the pill sits on the screen. */
  .shared-tank .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .shared-tank #open-in-app {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20; margin: 0;
    height: 52px; min-height: 52px; padding: 0 24px; border-radius: 26px; gap: 8px; white-space: nowrap;
    display: inline-flex; align-items: center; font-size: 16px; box-shadow: 0 6px 18px rgba(15, 36, 64, 0.3);
  }
  .shared-tank #open-in-app[hidden], body.viewer-open #open-in-app, body.report-open #open-in-app { display: none; }
  .open-in-app-icon { display: block; flex: none; }
  .shared-tank h2 { font-size: 17px; }
  .photo-count { font-size: 14px; }
  .photo-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .photo-box { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; border-radius: 14px; }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .photo-tile { border-radius: 12px; }
  .photo-viewer { padding: 0; gap: 0; }
  .viewer-top {
    position: absolute; top: 0; left: 0; right: 0; z-index: 1; padding: 16px 8px 24px; gap: 4px;
    background: linear-gradient(rgba(10, 22, 38, 0.75), rgba(10, 22, 38, 0));
  }
  .viewer-close { order: -1; width: 44px; height: 44px; border-radius: 22px; background: transparent; }
  .viewer-owner { font-size: 15px; }
  .viewer-meta { font-size: 13px; }
  .viewer-stage { position: absolute; inset: 0; display: block; }
  .viewer-image { position: absolute; inset: 0; border-radius: 0; }
  .viewer-step { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 22px; background: rgba(255, 255, 255, 0.18); z-index: 1; }
  .viewer-previous { left: 8px; }
  .viewer-next { right: 8px; }
  .viewer-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 12px 12px 34px; background: rgba(10, 22, 38, 0.85); }
  .viewer-strip { gap: 6px; }
  .viewer-thumb { width: 44px; min-width: 44px; height: 44px; border-width: 2px; border-radius: 8px; }
  .viewer-hint { font-size: 13px; }
  .viewer-hint-phone { display: block; }
  .viewer-desktop-only { display: none; }
  .viewer-like-row { display: flex; align-self: stretch; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
  .viewer-like.viewer-phone-only { display: flex; height: 44px; }
  .viewer-like.viewer-phone-only[hidden] { display: none; }
  .viewer-like-note.viewer-phone-only { display: block; font-size: 13px; }
  .viewer-like-note.viewer-phone-only:empty { display: none; }
  .like-note-shown .viewer-hint-phone { display: none; }
  /* Without likes the hint sits centred above the strip, as before. */
  .no-likes .viewer-like-row { justify-content: center; }
  .viewer-hint-desktop { display: none; }
  /* Side by side on phones (mock #2066): each up to 170 x 48, store name 15 px over an 11 px line. */
  .get-app-card .store-badges { flex-wrap: nowrap; gap: 10px; }
  .get-app-card .store-badge { flex: 1 1 0; min-width: 0; max-width: 170px; width: auto; height: 48px; padding: 0 10px; gap: 8px; }
  .get-app-card .store-badge svg { width: 24px; height: 24px; }
  .get-app-card .store-badge span { font-size: 11px; line-height: 1.15; white-space: nowrap; }
  .get-app-card .store-badge strong { font-size: 15px; white-space: nowrap; }
  body.report-open { overflow: hidden; }
  .report-form {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; flex-direction: column; align-items: stretch; gap: 6px;
    background: var(--background); border-radius: 24px 24px 0 0; padding: 20px 16px 28px;
    box-shadow: 0 0 0 100vmax rgba(15, 36, 64, 0.45);
  }
  .report-question { margin: 0 0 6px; font: 700 22px 'Bricolage Grotesque', sans-serif; }
  .report-reasons { flex-direction: column; gap: 6px; }
  .report-reasons button { min-height: 52px; border-radius: 14px; display: flex; align-items: center; gap: 12px; text-align: left; }
  .report-reasons button::before {
    content: ''; flex: none; width: 20px; height: 20px; box-sizing: border-box; border-radius: 10px; border: 2px solid var(--muted);
  }
  .report-reasons button[aria-checked="true"]::before { border-color: var(--primary); background: radial-gradient(var(--primary) 0 4.5px, transparent 5px); }
  .report-actions { display: flex; gap: 10px; margin-top: 10px; }
  .report-cancel, .report-send { flex: 1; min-height: 48px; border-radius: 14px; font: 600 15px 'Figtree', sans-serif; cursor: pointer; }
  .report-cancel { display: block; border: 1px solid var(--line); background: var(--background); color: var(--ink); }
  .report-cancel:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
  .report-status {
    position: fixed; left: 16px; right: 16px; bottom: 32px; z-index: 45; min-height: 48px; padding: 12px 16px; border-radius: 14px;
    background: #0F2440; color: #FFFFFF; box-shadow: 0 6px 16px rgba(15, 36, 64, 0.25); font-size: 14px; font-weight: 500;
  }
  .report-status.report-toast-gone { display: none; }
}
/* Shared tank v609-v611 (#1213): light/dark switch, plan badge, Lost section, ad slots, larger graphs, photo pills,
   full screen viewer (17f). */
.brand .brand-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .brand-light { display: none; }
  :root:not([data-theme="light"]) .brand .brand-dark { display: block; }
}
:root[data-theme="dark"] .brand .brand-light { display: none; }
:root[data-theme="dark"] .brand .brand-dark { display: block; }
/* Solid over the page as it scrolls (mock 17e): nothing, such as the chart labels, shows through it. */
.shared-tank .site-header { background: var(--background); -webkit-backdrop-filter: none; backdrop-filter: none; z-index: 30; }
.shared-tank .site-header .bar { min-height: 84px; padding-top: 16px; padding-bottom: 16px; }
.shared-tank .brand img { height: 52px; }
.theme-button {
  flex: none; width: 44px; height: 44px; padding: 0; border-radius: 22px; border: 1px solid var(--line);
  background: var(--background); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.theme-button:hover { border-color: var(--primary); }
.theme-button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.theme-sun, .theme-button[aria-pressed="true"] .theme-moon { display: none; }
.theme-button[aria-pressed="true"] .theme-sun { display: block; }
.shared-owner-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* The owner's social media usernames, plain text with the site icon, never links (mock v627, #1392). */
.shared-socials { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 2px 0; }
.shared-social { min-height: 24px; display: inline-flex; align-items: center; gap: 5px; font: 600 13px 'Figtree', sans-serif; color: var(--social-ink); }
.shared-social svg { flex: none; }
.plan-badge { display: inline-flex; align-items: center; font-size: 12px; line-height: 1.5; border-radius: 8px; white-space: nowrap; }
.plan-badge-club {
  gap: 4px; padding: 2px 8px 2px 6px; font-weight: 800; letter-spacing: 0.2px; color: #FFFFFF;
  background: linear-gradient(90deg, #0B3D7A, #1565C0 55%, #3FA7D6);
}
/* Badge on the dark Aqua Club plan card (mock v620). */
.plan-badge-club.plan-badge-on-dark { line-height: normal; background: linear-gradient(90deg, #1565C0, #3FA7D6); border: 1px solid #9DC7F5; }
.plan-badge-free { padding: 1px 8px; font-weight: 700; color: var(--muted); background: var(--tint); border: 1px solid var(--line); }
.shared-side > #shared-lost { gap: 8px; }
.section-title { display: flex; flex-direction: column; gap: 2px; }
.section-note { font-size: 13px; color: var(--muted); }
.shared-list-lost .shared-list-name { font-size: 15px; color: var(--body-ink); }
.shared-list-lost .shared-list-detail { font-size: 13px; }
.shared-list-lost .shared-list-value { font-size: 14px; }
.shared-list-lost .shared-list-lost-date { min-width: 76px; text-align: right; font-size: 13px; }
/* Google AdSense units on the shared tank page (#2030, mock #2031), for every visitor: two on computers and phones. */
.ad-slot { display: flex; flex-direction: column; gap: 4px; }
.ad-label { font-size: 12px; color: var(--muted); padding: 0 4px; }
/* Website log in (#2040, mock #2042): "Aqua Club? Log in to hide ads" on the Ad label row for visitors not logged in;
   "Logged in" + Aqua Club pill + Log out in the header on computers, under Report a problem on phones. */
.ad-label-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ad-log-in { min-height: 44px; margin: -14px 0; padding: 0 4px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; color: var(--primary); }
.web-session { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 15px; color: var(--social-ink); }
.web-session .web-log-out { min-height: 44px; padding: 0 4px; font-size: 15px; }
.web-club-pill { font-size: 12px; font-weight: 700; line-height: 1.5; padding: 3px 8px; border-radius: 10px; background: #D6E6F5; color: #1F4E79; }
.web-session-footer { font-size: 14px; color: var(--muted); }
@media (max-width: 640px) { .web-session-header { display: none !important; } }
@media (min-width: 641px) { .web-session-footer { display: none !important; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .web-club-pill { background: #1F3A5C; color: #C3D2E4; } }
:root[data-theme="dark"] .web-club-pill { background: #1F3A5C; color: #C3D2E4; }
.ad-box { min-height: 100px; }
/* No ad to show: drop the whole slot, "Ad" label included. */
.ad-slot:has(ins[data-ad-status="unfilled"]) { display: none; }
button.measurement-tile { width: 100%; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
button.measurement-tile:hover { border-color: var(--primary); }
button.measurement-tile:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.measurement-name { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.measurement-name svg { flex: none; color: var(--muted); }
body.graph-open { overflow: hidden; }
.graph-dialog-backdrop {
  position: fixed; inset: 0; z-index: 60; padding: 16px; background: rgba(15, 36, 64, 0.55);
  display: flex; align-items: center; justify-content: center;
}
.graph-dialog {
  width: min(840px, 100%); max-height: 100%; overflow: auto; padding: 24px 28px; border-radius: 24px;
  background: var(--background); color: var(--ink); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  display: flex; flex-direction: column; gap: 14px;
}
.graph-dialog-top { display: flex; align-items: center; gap: 12px; }
.graph-dialog-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.graph-dialog-name { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.graph-dialog-latest { font-size: 14px; color: var(--muted); }
.graph-close {
  flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 22px;
  background: var(--background); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.graph-close:focus-visible, .graph-range button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.graph-range { align-self: flex-start; gap: 4px; }
.big-graph { display: block; }
.big-graph-background { fill: var(--section-alt); }
.big-graph-guide { stroke: var(--line); }
.big-graph-guide-label { font: 400 12px 'Figtree', sans-serif; fill: var(--muted); }
.big-graph-line { stroke: var(--primary); }
.big-graph-dot { fill: var(--background); stroke: var(--primary); }
.big-graph-value { font: 600 11px 'Figtree', sans-serif; fill: var(--ink); }
.graph-axis { display: flex; justify-content: space-between; padding: 0 2.1% 0 5.3%; font-size: 13px; color: var(--muted); }
.graph-hint { font-size: 13px; color: var(--muted); }
.graph-hint-phone { display: none; }
/* Photo pills: date and time, nickname tags. Placed by script on the photo's bottom-left corner. */
.viewer-tags { position: absolute; left: 16px; bottom: 16px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.viewer-tag {
  display: inline-flex; align-items: center; gap: 6px; max-width: 240px; padding: 5px 10px; border-radius: 14px;
  background: rgba(10, 22, 38, 0.72); color: #FFFFFF; font: 600 13px 'Figtree', sans-serif; white-space: nowrap;
}
.viewer-tag svg { flex: none; }
.viewer-tag-text { overflow: hidden; text-overflow: ellipsis; }
.viewer-full-button {
  flex: none; width: 48px; height: 48px; padding: 0; border: none; border-radius: 24px; background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.viewer-full-button:hover { background: rgba(255, 255, 255, 0.28); }
.full-exit, .viewer-full .full-enter { display: none; }
.viewer-full .full-exit { display: block; }
.viewer-full-hint { display: none; }
/* Full screen (board 17f): the photo on black, buttons over it; the strip goes. */
.photo-viewer.viewer-full { padding: 0; gap: 0; background: #000000; }
.viewer-full .viewer-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding: 12px 16px 28px; gap: 10px;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
}
.viewer-full .viewer-close, .viewer-full .viewer-bottom { display: none; }
.viewer-full .viewer-full-button { order: -1; width: 44px; height: 44px; border-radius: 22px; background: rgba(255, 255, 255, 0.16); }
.viewer-full .viewer-owner { font-size: 15px; }
.viewer-full .viewer-meta { font-size: 13px; }
.viewer-full .viewer-like.viewer-desktop-only { display: flex; height: 44px; }
.viewer-full .viewer-like-note.viewer-desktop-only { display: block; font-size: 13px; }
.viewer-full .viewer-like-note.viewer-desktop-only:empty { display: none; }
.viewer-full .viewer-stage { position: absolute; inset: 0; display: block; }
.viewer-full .viewer-image { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.viewer-full .viewer-step {
  position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -24px; border-radius: 24px;
  background: rgba(255, 255, 255, 0.18);
}
.viewer-full .viewer-previous { left: 12px; }
.viewer-full .viewer-next { right: 12px; }
.viewer-full .viewer-full-hint {
  display: block; position: absolute; left: 50%; bottom: 12px; z-index: 2; transform: translateX(-50%);
  max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; padding: 6px 12px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.55); color: #FFFFFF; font-size: 13px; white-space: nowrap;
}
.controls-hidden .viewer-top, .controls-hidden .viewer-step, .controls-hidden .viewer-tags, .controls-hidden .viewer-full-hint { display: none !important; }
@media (max-width: 640px) {
  .shared-tank .site-header nav { flex-basis: auto; margin-left: auto; }
  .shared-owner { font-size: 13px; }
}
@media (max-width: 599px) {
  .shared-tank .site-header .bar { min-height: 0; padding-top: 12px; padding-bottom: 12px; }
  .shared-tank .brand img { height: 40px; }
  .viewer-full-button { width: 44px; height: 44px; border-radius: 22px; background: transparent; }
  .graph-dialog-backdrop { align-items: flex-end; padding: 0; background: rgba(15, 36, 64, 0.45); }
  .graph-dialog { width: 100%; padding: 18px 16px 32px; gap: 12px; border-radius: 24px 24px 0 0; box-shadow: none; }
  .graph-axis { padding: 0 4.7% 0 11.8%; }
  .graph-hint-desktop { display: none; }
  .graph-hint-phone { display: block; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip-water { background: #1B3A5C; color: #CFE3F8; }
}
:root[data-theme="dark"] .chip-water { background: #1B3A5C; color: #CFE3F8; }

/* Tank name first, then "Shared by" + plan badge under it (mock #2073, Cyrus 2026-11-03 "how about under it?"). */
.shared-name-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
/* Phone web (mock #2073, board 17e): logo in the middle of the header with the theme button on the right, a tighter top
   section, and a photo box about 35% of the screen (half a row cut so it reads as scrollable) that hands the swipe on
   to the page at its end, so Inhabitants shows on the first screen and the rest of the page is always reachable. */
@media (max-width: 599px) {
  .shared-tank .site-header .bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding-bottom: 6px; }
  .shared-tank .brand { grid-column: 2; }
  .shared-tank .site-header nav { grid-column: 3; justify-self: end; margin-left: 0; }
  .shared-tank main { padding-top: 10px; }
  .shared-heading { gap: 6px 16px; margin-bottom: 14px; }
  .shared-title, .shared-name-row { gap: 2px; }
  .shared-title h1 { font-size: 24px; line-height: 1.15; }
  .shared-socials { gap: 2px 14px; margin: 0; }
  .shared-chips { gap: 6px; }
  .shared-chips .chip { font-size: 12px; padding: 3px 9px; }
  .shared-columns { gap: 14px; }
  .shared-photos { gap: 6px; }
  .photo-chip { height: 36px; }
  .photo-box { max-height: 300px; max-height: min(520px, 45svh); overscroll-behavior-y: auto; }
}

@media print {
  .site-header, .site-footer, .skip-link, .faq-search, .topic-chips { display: none; }
  body { font-size: 12pt; }
}

/* /bot-check/ (#1214, board 15e): opened only in the app's sign-up WebView. No header, footer, logo or app name, and always
   light, like the Turnstile widget on it. */
body.bot-check { background: #FFFFFF; color: #0F2440; color-scheme: light; }
body.bot-check main { max-width: none; margin: 0; padding: 24px 20px; display: flex; flex-direction: column; gap: 14px; }
.bot-check-lead { margin: 0; font-size: 15px; line-height: 1.45; color: #34465E; }
.bot-check-widget { min-height: 65px; }
.bot-check-widget[hidden], .bot-check-failed[hidden] { display: none; }
.bot-check-failed { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #E7C3B2; border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.45; color: #34465E; }
.bot-check-failed > span:first-child { flex: none; color: #A2451A; font-weight: 700; font-size: 15px; }
.bot-check-note { margin: 0; font-size: 12px; line-height: 1.45; color: #4A5C73; }
.bot-check-note a { color: #1565C0; }
.bot-check-note a:hover { color: #0B3D7A; }

/* Language menu in the header (2026-10-22): globe + current language, opens a list of the three languages. */
.language-menu, .language-menu[open] { position: relative; order: 3; margin: 0 0 0 8px; padding: 0; border: 0; border-radius: 0; background: none; overflow: visible; }
.language-menu > .language-options { margin: 0; font-size: 15px; line-height: 1.4; }
.language-menu summary { min-width: 0; justify-content: flex-start; line-height: 1; list-style: none; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-weight: 600; font-size: 15px; cursor: pointer; }
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu summary::after { content: none; }
.language-menu summary:hover, .language-menu[open] summary { color: var(--primary); border-color: var(--primary); }
.language-options { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 168px; padding: 6px; background: var(--background); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(15, 30, 50, .14); display: flex; flex-direction: column; }
.language-options a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.language-options a:hover { background: var(--line); }
.language-options a[aria-current] { color: var(--primary); }
@media (max-width: 640px) {
  body:not(.shared-tank) .language-menu, body:not(.shared-tank) .language-menu[open] { order: 1; margin-left: auto; }
  /* Home: "Get the app" keeps the spot beside the logo; the menu ends the row of links. */
  body:not(.shared-tank) .bar:has(.nav-button) .language-menu { order: 2; margin-left: 4px; flex: none; }
  body:not(.shared-tank) .bar:has(.language-menu) nav a:not(.nav-button) { flex: 1 1 0; }
  /* The open list sits above the page below the header. */
  body:not(.shared-tank) .site-header { position: relative; z-index: 5; }
  body:not(.shared-tank) .site-header nav a.nav-button { margin-left: auto; }
  body:not(.shared-tank) .language-menu summary { padding: 0 10px; }
}

/* Shared tank videos (#1999): the stream plays in place of the still frame; a note when it can't. */
.viewer-image[hidden], .viewer-video-error[hidden] { display: none; }
/* No long-press Save on phones and no dragging photos out (Cyrus 2026-11-03); shared-tank.js also blocks the right-click menu. */
.shared-tank img, .shared-tank video { -webkit-touch-callout: none; -webkit-user-drag: none; -webkit-user-select: none; user-select: none; }
.viewer-video { background: #000; }
/* On phones the bottom bar lies over the stage: the video stops above it so its play bar stays usable. */
@media (max-width: 599px) { .photo-viewer:not(.viewer-full) .viewer-video { bottom: auto; height: calc(100% - var(--viewer-bottom-height, 0px)); } }
.viewer-video-error { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: 10px 16px; border-radius: 12px; background: rgba(15, 36, 64, 0.85); color: #fff; font-size: 15px; text-align: center; max-width: calc(100% - 32px); }
