/*
 * Ruto + Harmi Studio website. The app's Ember dark theme, in CSS.
 * Values mirror src/theme/colors.ts and tokens.ts; keep them in step.
 * site/studio/assets/site.css is a copy of this file: change both.
 */

@font-face {
  font-family: 'Barlow Condensed';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/BarlowCondensed_700Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/DMSans_400Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-weight: 500;
  font-display: swap;
  src: url('fonts/DMSans_500Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/JetBrainsMono_400Regular.ttf') format('truetype');
}

:root {
  --bg-base: #010b17;
  --bg-surface: #021122;
  --bg-elevated: #00162b;
  --accent: #f5b73c;
  --accent-hover: #f8cb72;
  --accent-muted: rgba(245, 183, 60, 0.14);
  --on-accent: #0e0e0e;
  --success: #4caf82;
  --text-primary: #f0ede8;
  --text-secondary: #bdb8b1;
  --text-muted: #9c968e;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --radius-card: 4px;
  --radius-button: 6px;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
}
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0;
}
p {
  margin: 0;
}

/* ---- Building blocks ---- */

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}
.label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.label--accent {
  color: var(--accent);
}
.label--muted {
  color: var(--text-muted);
}
.lead {
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1.55;
  max-width: 600px;
}
.muted {
  color: var(--text-secondary);
}
.band {
  border-top: 1px solid var(--border);
}
.band--surface {
  background: var(--bg-surface);
}
.section {
  padding-top: 96px;
  padding-bottom: 96px;
}
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
}
.card--surface {
  background: var(--bg-surface);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 16px;
}
.icon {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  flex: none;
}

.btn {
  display: inline-block;
  padding: 15px 24px;
  border-radius: var(--radius-button);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}
.btn--secondary {
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn--secondary:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}
.btn--small {
  padding: 10px 16px;
  font-size: 15px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- Header and footer ---- */

.site-header {
  border-bottom: 1px solid var(--border);
}
.site-header__inner,
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
}
.site-header__inner {
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}
.brand:hover {
  color: var(--text-primary);
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.5px;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}
.nav a:not(.btn) {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}
.nav a:not(.btn):hover {
  color: var(--text-primary);
}
.nav a[aria-current='page'] {
  color: var(--accent);
}
.site-footer {
  border-top: 1px solid var(--border);
}
.site-footer__inner {
  padding-top: 40px;
  padding-bottom: 40px;
}
.site-footer small {
  color: var(--text-muted);
  font-size: 14px;
}
.site-footer small a {
  color: var(--text-secondary);
}

/* ---- Ruto home ---- */

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 96px;
}
.hero__text {
  flex: 1 1 min(460px, 100%);
  min-width: 0;
}
.hero h1 {
  font-size: clamp(64px, 9vw, 112px);
  line-height: 0.92;
  letter-spacing: -2px;
  margin-top: 20px;
}
.hero .lead {
  margin-top: 28px;
}
.hero .actions {
  margin-top: 40px;
}
.platforms {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.platforms li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 14px;
  transition:
    border-color 160ms ease,
    color 160ms ease;
}
.platforms li:hover {
  border-color: rgba(245, 183, 60, 0.5);
  color: var(--text-primary);
}
.platforms svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.section h2 {
  font-size: clamp(44px, 6vw, 64px);
  line-height: 1;
  margin: 12px 0 48px;
}
.split {
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
  align-items: flex-start;
}
.split > * {
  flex: 1 1 min(440px, 100%);
  min-width: 0;
}
.split h2 {
  font-size: clamp(48px, 7vw, 72px);
  line-height: 0.95;
  margin-bottom: 0;
}
.split .lead {
  margin-top: 24px;
}
.points {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
}
.points li {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
.points .label {
  padding-top: 5px;
  color: var(--accent);
}
.points strong {
  display: block;
  font-size: 19px;
  font-weight: 500;
}
.points span {
  color: var(--text-secondary);
  font-size: 16px;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
}
.cta h2 {
  margin: 0;
}
.cta p {
  margin-top: 16px;
}

/* The phone on the home page, drawn after the real Home screen. */
.phone {
  flex: 0 0 auto;
  margin: 0 auto;
  width: 340px;
  height: 720px;
  border-radius: 52px;
  border: 10px solid #1b2330;
  background: var(--bg-base);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.4;
}
.phone__screen {
  flex: 1;
  padding: 44px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.phone__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.phone__greeting {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
}
.phone__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  font-weight: 500;
}
.phone .label {
  font-size: 8.5px;
  letter-spacing: 1.6px;
}
.phone__streak {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  padding: 14px 12px;
}
.phone__count {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  margin-right: 6px;
}
.phone__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
  text-align: center;
}
.phone__days .label {
  color: var(--text-muted);
}
.phone__days .label--accent {
  color: var(--accent);
}
.day {
  height: 30px;
  border-radius: var(--radius-card);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-muted);
}
.day--done {
  background: var(--accent);
  color: var(--on-accent);
}
.day--next {
  border: 1px dashed var(--accent);
  color: var(--accent);
}
.day--open {
  border: 1px solid var(--border);
}
.day svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.6;
}
.phone__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
}
.phone__sub {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: -6px;
}
.phone__table {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.phone__table div {
  display: flex;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
}
.phone__table div:first-child {
  border-top: 0;
  background: var(--bg-surface);
  justify-content: space-between;
}
.phone__table div + div span:nth-child(2) {
  flex: 1;
}
.phone__table .label {
  font-size: 10px;
  letter-spacing: 1px;
}
.phone__table .phone__more {
  justify-content: space-between;
  color: var(--text-secondary);
}
.phone__table .phone__more span:nth-child(2) {
  flex: none;
}
.phone__start {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-button);
  text-align: center;
  padding: 12px;
  font-weight: 500;
  font-size: 15px;
}
.phone__tabs {
  display: flex;
  justify-content: space-around;
  padding: 12px 0 22px;
  border-top: 1px solid var(--border);
}
.phone__tabs .label {
  font-size: 9px;
  color: var(--text-muted);
}
.phone__tabs .label--accent {
  color: var(--accent);
}

/* ---- What it does: a walk through the app, one screen per step ---- */

.tour__intro {
  margin-top: -32px;
}
.tour {
  list-style: none;
  margin: 64px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 96px;
}
.tour__step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 48px 120px;
}
.tour__step:nth-child(even) {
  flex-direction: row-reverse;
}
.tour__text {
  flex: 1 1 min(420px, 100%);
  max-width: 480px;
  min-width: 0;
}
.tour__text h3 {
  font-size: clamp(36px, 4.5vw, 48px);
  line-height: 1;
  margin: 14px 0 16px;
}
.tour__text p:not(.label) {
  color: var(--text-secondary);
  font-size: 17px;
}
.tour .phone {
  margin: 0;
  zoom: 0.9;
}
.ticks {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.ticks li {
  position: relative;
  padding-left: 28px;
  font-size: 16px;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 6px;
  width: 10px;
  height: 5px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* Pieces of the drawn screens. Names start ph- so they never meet a page style. */
.ph-tabs {
  display: grid;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.ph-tabs--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ph-tabs--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ph-tabs span {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 2px 0 8px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ph-tabs .is-on {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.ph-tabs svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ph-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-surface);
}
.ph-card--on {
  border-color: var(--accent);
}
.ph-h1,
.ph-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
}
.ph-h1 {
  font-size: 30px;
}
.ph-h2 {
  font-size: 26px;
}
.ph-strong {
  color: var(--text-primary);
}
.ph-text {
  color: var(--text-secondary);
  font-size: 13px;
}
.ph-accent {
  color: var(--accent);
}
.ph-bar {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 3px;
}
.ph-bar i {
  height: 3px;
  background: var(--bg-elevated);
}
.ph-bar i.is-on {
  background: var(--accent);
}
.ph-ghost {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-button);
  padding: 8px;
  text-align: center;
  font-size: 14px;
}
.ph-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.ph-item__text {
  flex: 1;
  display: grid;
  font-size: 14px;
}
.ph-item small,
.ph-stats small {
  color: var(--text-secondary);
  font-size: 11px;
}
.ph-plus {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-card);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 22px;
}
.ph-chip {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-button);
  padding: 5px 10px;
  font-size: 12px;
}
.ph-back {
  width: 34px;
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
}
.ph-timer {
  border: 1px solid rgba(245, 183, 60, 0.5);
  border-radius: var(--radius-card);
  padding: 3px 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
}
.ph-pills {
  display: flex;
  gap: 6px;
  overflow: hidden;
}
.ph-pill {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  padding: 5px 9px;
  font-size: 12px;
  color: var(--text-secondary);
}
.ph-pill.is-done .label {
  color: var(--accent);
}
.ph-pill.is-on {
  border-color: var(--accent);
  background: var(--accent-muted);
  color: var(--text-primary);
}
.ph-pill.is-on .label {
  color: var(--accent);
}
.ph-sets {
  font-size: 13px;
}
.ph-sets div {
  display: flex;
  padding: 8px 6px;
  border-top: 1px solid var(--border);
}
.ph-sets div:first-child {
  border-top: 0;
  padding-top: 0;
}
.ph-sets span:first-child {
  width: 34px;
}
.ph-sets span:not(:first-child) {
  flex: 1;
  text-align: center;
}
.ph-sets span:nth-child(2) {
  color: var(--text-muted);
}
.ph-sets .is-next {
  border: 1px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--accent-muted);
}
.ph-sets .is-next .label {
  color: var(--accent);
}
.ph-rest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  padding: 6px 14px;
}
.ph-rest > .label {
  color: var(--accent);
}
.ph-rest__clock {
  display: grid;
  justify-items: center;
}
.ph-rest__time,
.ph-stepper b,
.ph-num,
.ph-weight {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
}
.ph-rest__time {
  font-size: 26px;
  color: var(--accent);
}
.ph-steppers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ph-steppers > div {
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  padding: 7px 0;
}
.ph-steppers .label:last-child {
  color: var(--accent);
}
.ph-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4px 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ph-stepper i {
  font-style: normal;
  color: var(--accent);
  font-size: 18px;
}
.ph-stepper b {
  font-size: 28px;
}
.ph-logbar {
  padding-top: 16px;
}
.ph-center {
  justify-content: space-between;
}
.ph-tags {
  display: flex;
  gap: 6px;
}
.ph-tags span {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-button);
  padding: 3px 10px;
  font-size: 12px;
  color: var(--text-secondary);
}
.ph-tags span:first-child {
  border-color: rgba(245, 183, 60, 0.6);
  color: var(--text-primary);
}
.ph-toggle {
  display: flex;
  gap: 4px;
}
.ph-toggle span {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 3px 7px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.ph-toggle .is-on {
  border-color: var(--accent);
  background: var(--accent-muted);
  color: var(--accent);
}
.ph-chart {
  width: 100%;
  height: auto;
}
.ph-chart__grid {
  stroke: var(--border);
}
.ph-chart__area {
  fill: var(--accent-muted);
}
.ph-chart__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}
.ph-chart__dot {
  fill: var(--accent);
}
.ph-chart__dots {
  fill: var(--text-muted);
}
.ph-chart__goal {
  stroke: var(--accent);
  stroke-dasharray: 4 4;
  opacity: 0.6;
}
.ph-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-surface);
}
.ph-stats div {
  display: grid;
  gap: 4px;
  padding: 10px;
}
.ph-stats div + div {
  border-left: 1px solid var(--border);
}
.ph-num {
  font-size: 24px;
}
.ph-num small,
.ph-weight small {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  margin-left: 3px;
}
.ph-stats .ph-good {
  color: var(--success);
}
.ph-read {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.1;
}
.ph-weight {
  font-size: 48px;
}
.ph-weight small {
  font-size: 16px;
}
.ph-list {
  display: grid;
  font-size: 13px;
}
.ph-list div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.ph-list div span:first-child {
  color: var(--text-secondary);
}
.ph-list .label {
  padding-bottom: 6px;
}
.ph-bottom {
  margin-top: auto;
  margin-bottom: 14px;
}

/* The watch, drawn after the watch app's log screen. */
.watch {
  position: relative;
  flex: 0 0 auto;
  width: 250px;
  height: 300px;
  border-radius: 66px;
  background: #1b2330;
  padding: 14px;
}
.watch__screen {
  height: 100%;
  border-radius: 54px;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.watch .label {
  font-size: 9px;
  letter-spacing: 1.4px;
}
.watch__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
}
.watch__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 46px;
  line-height: 1;
  color: var(--accent);
}
.watch__value small {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 4px 0 2px;
}
.watch__log {
  margin-top: 6px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  padding: 9px 40px;
  font-weight: 500;
  font-size: 14px;
}
.watch__crown {
  position: absolute;
  right: -8px;
  top: 80px;
  width: 10px;
  height: 44px;
  border-radius: 4px;
  background: #2a3442;
}

/* ---- Documents: privacy, support ---- */

.doc-hero {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 80px 0 64px;
}
.doc-hero h1 {
  font-size: clamp(60px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: -1.5px;
  margin-top: 12px;
}
.doc-hero .lead {
  margin-top: 24px;
  max-width: 720px;
}
.doc-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 28px;
}
.doc-meta .label {
  font-size: 11px;
  color: var(--text-muted);
}
.doc-meta .label span {
  color: var(--text-primary);
}
.summary {
  margin-top: 64px;
}
.summary .grid {
  margin-top: 16px;
}
.summary .card {
  padding: 24px;
}
.summary strong {
  display: block;
  margin-top: 14px;
  font-weight: 500;
}
.summary p {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 15px;
}
.doc-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 72px;
  align-items: flex-start;
  padding-top: 16px;
  padding-bottom: 96px;
}
.toc {
  flex: 1 1 min(220px, 100%);
  max-width: 250px;
  padding-top: 64px;
}
.toc ol {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  counter-reset: toc;
}
.toc li {
  counter-increment: toc;
}
.toc a {
  display: flex;
  gap: 14px;
  padding: 7px 0;
  color: var(--text-secondary);
  font-size: 15px;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  padding-top: 3px;
}
.toc a:hover {
  color: var(--text-primary);
}
.doc {
  flex: 999 1 min(560px, 100%);
  min-width: 0;
  max-width: 720px;
  line-height: 1.7;
  counter-reset: section;
}
.doc > section {
  padding-top: 64px;
  scroll-margin-top: 16px;
  counter-increment: section;
}
.doc > section::before {
  content: counter(section, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
}
.doc h2 {
  font-size: 40px;
  line-height: 1.05;
  margin: 8px 0 20px;
}
.doc p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}
.doc b {
  color: var(--text-primary);
  font-weight: 500;
}
.deflist {
  margin: 0;
  border-top: 1px solid var(--border);
}
.deflist div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.deflist dt {
  flex: 0 0 150px;
  font-weight: 500;
}
.deflist dd {
  flex: 1 1 min(360px, 100%);
  margin: 0;
  color: var(--text-secondary);
}
.callout {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  padding: 24px 28px;
  background: var(--bg-surface);
  border: 1px solid rgba(245, 183, 60, 0.45);
  border-radius: var(--radius-card);
}
.callout p {
  margin: 0;
  color: var(--text-primary);
}
.doc .grid {
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  margin: 8px 0 24px;
}
.doc .card {
  padding: 22px 24px;
}
.doc .card p {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.6;
}
.doc .card .label {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--accent);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.stack .card strong {
  font-weight: 500;
}
.stack .card p {
  margin-top: 4px;
}
.table-box {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-bottom: 20px;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 620px;
}
th,
td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 15px;
  color: var(--text-secondary);
}
th {
  border-top: 0;
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
}
td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}
.contact-box {
  margin-top: 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
}
.contact-box h2 {
  font-size: 28px;
  margin: 0;
}
.contact-box p {
  margin: 0;
  font-size: 16px;
}
.to-top {
  display: inline-block;
  margin-top: 32px;
}
.more {
  margin-top: 28px;
}
.doc-meta a {
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}
.faq h2 {
  margin-bottom: 8px;
}
.not-found {
  padding-top: 120px;
  padding-bottom: 120px;
}
.not-found h1 {
  font-size: clamp(64px, 9vw, 112px);
  line-height: 0.92;
  margin-top: 20px;
}
.not-found .lead {
  margin: 24px 0 40px;
}

/* Support */
.support {
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
  align-items: flex-start;
  padding-top: 72px;
  padding-bottom: 96px;
}
.support__intro {
  flex: 1 1 min(340px, 100%);
  min-width: 0;
  max-width: 420px;
}
.support__intro h1 {
  font-size: clamp(60px, 8vw, 80px);
  line-height: 0.95;
}
.support__intro .lead {
  margin-top: 20px;
}
.support__intro .card {
  margin-top: 32px;
  padding: 24px;
}
.support__email {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.support__hint {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 15px;
}
.faq {
  flex: 999 1 min(560px, 100%);
  min-width: 0;
  max-width: 720px;
}
.faq details {
  border-top: 1px solid var(--border);
  padding: 22px 0;
}
.faq details:last-child {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 20px;
  font-weight: 500;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  color: var(--accent);
}
.faq details[open] summary::after {
  content: '−';
}
.faq p {
  margin-top: 12px;
  color: var(--text-secondary);
}

/* Delete your account: the support layout, with steps instead of questions. */
.erase {
  display: grid;
  gap: 40px;
}
.erase section {
  border-top: 1px solid var(--border);
  padding-top: 22px;
}
.erase p:not(.label) {
  margin-top: 12px;
  color: var(--text-secondary);
}
.erase__steps {
  list-style: none;
  counter-reset: step;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.erase__steps li {
  counter-increment: step;
  display: flex;
  gap: 16px;
  font-size: 18px;
}
.erase__steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 13px;
  padding-top: 4px;
  color: var(--accent);
}

/* ---- Studio ---- */

.studio {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.studio > .wrap {
  width: 100%;
}
.studio main {
  flex: 1;
  padding-top: 120px;
  padding-bottom: 120px;
}
.studio h1 {
  font-size: clamp(64px, 9vw, 112px);
  line-height: 0.92;
  letter-spacing: -2px;
  margin-top: 20px;
}
.studio .lead {
  margin-top: 32px;
}
.studio-mark {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-card);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--accent);
}
.studio-name {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
}
.apps-label {
  margin: 112px 0 20px;
}
.app-card {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  max-width: 640px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  color: var(--text-primary);
}
.app-card:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.app-card img {
  width: 80px;
  height: 80px;
  border-radius: 18px;
}
.app-card__body {
  flex: 1;
  min-width: min(200px, 100%);
}
.app-card__name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  line-height: 1;
}
.tag {
  padding: 3px 10px;
  border-radius: var(--radius-button);
  background: var(--accent-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}
.app-card__arrow {
  display: inline-block;
  color: var(--accent);
  font-size: 24px;
}

/* ---- Hover ---- */

.btn,
.card,
.app-card,
.toc a,
.points li,
.app-card__arrow,
.faq summary {
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.summary .card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 183, 60, 0.4);
}
.points li:hover strong,
.faq summary:hover {
  color: var(--accent);
}
.toc a:hover {
  transform: translateX(3px);
}
.app-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 183, 60, 0.4);
}
.app-card:hover .app-card__arrow {
  transform: translateX(4px);
}
.phone,
.watch {
  transition: translate 200ms ease;
}
.phone:hover,
.watch:hover {
  translate: 0 -6px;
}
tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* A line that grows under text links on hover. */
.nav a:not(.btn),
.more a,
.to-top,
.site-footer small a,
.studio .site-footer__inner > a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px;
  transition:
    background-size 200ms ease,
    color 160ms ease;
}
.nav a:not(.btn):hover,
.more a:hover,
.to-top:hover,
.site-footer small a:hover,
.studio .site-footer__inner > a:hover {
  background-size: 100% 1px;
}

/* ---- Small screens ---- */

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .hero {
    padding-top: 40px;
    gap: 40px;
  }
  .nav {
    gap: 12px 20px;
  }
  .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }
  .phone {
    transform: scale(0.85);
    transform-origin: top center;
    margin-bottom: -108px;
  }
  .tour {
    gap: 72px;
    margin-top: 48px;
  }
  .tour__step,
  .tour__step:nth-child(even) {
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
  }
  .tour .phone,
  .tour .watch {
    margin: 0 auto;
  }
  .tour .phone {
    zoom: 0.82;
  }
  .toc {
    max-width: none;
    padding-top: 40px;
  }
  .doc-layout {
    gap: 0;
  }
  .studio main {
    padding-top: 72px;
    padding-bottom: 72px;
  }
  .apps-label {
    margin-top: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
  .btn:hover,
  .summary .card:hover,
  .toc a:hover,
  .app-card:hover,
  .app-card:hover .app-card__arrow {
    transform: none;
  }
  .phone:hover,
  .watch:hover {
    translate: none;
  }
}
