:root {
  --ink: #172421;
  --muted: #566761;
  --paper: #f7f4ea;
  --surface: #ffffff;
  --water: #176a78;
  --reed: #276345;
  --moss: #7b9155;
  --sun: #efb84f;
  --clay: #b9563f;
  --line: #d8d3c4;
  --mist: #e4efdf;
  --deep-water: #0d4853;
  --night: #10211e;
  --shadow: 0 18px 42px rgba(23, 36, 33, 0.16);
  --shadow-soft: 0 12px 30px rgba(23, 36, 33, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 8% 10%, #ffffff 0, transparent 28rem), var(--paper);
  font-family: Inter, "Avenir Next", Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 13px clamp(16px, 4vw, 52px);
  border-bottom: 1px solid rgba(23, 36, 33, 0.11);
  background: rgba(247, 244, 234, 0.88);
  box-shadow: 0 8px 20px rgba(23, 36, 33, 0.04);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.site-nav a {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: #e4efdf;
  outline: none;
}

.account-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 0 4px 8px;
  border-left: 1px solid var(--line);
}

.account-label {
  max-width: 22ch;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-action {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.account-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.account-menu {
  position: relative;
}

.account-menu .account-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 24ch;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 110;
  display: grid;
  min-width: 180px;
  padding: 8px;
  border: 1px solid rgba(23, 36, 33, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.account-dropdown a,
.account-dropdown button {
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-dropdown a:hover,
.account-dropdown a:focus-visible,
.account-dropdown button:hover,
.account-dropdown button:focus-visible {
  background: #e4efdf;
  outline: none;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(680px, calc(100vh - 84px));
  padding: clamp(52px, 8vw, 108px) clamp(16px, 6vw, 90px) clamp(44px, 6vw, 74px);
  background:
    linear-gradient(90deg, rgba(10, 29, 24, 0.93) 0%, rgba(12, 49, 43, 0.75) 47%, rgba(23, 36, 33, 0.08) 100%),
    url("/diary/media/d72dbc1a850b1880c83d40c1a5622a26a7f9aa3d1808c89c0a12a18e22281457.svg") center / cover no-repeat;
}

.hero::after {
  position: absolute;
  right: clamp(18px, 5vw, 84px);
  bottom: clamp(20px, 4vw, 62px);
  width: min(260px, 36vw);
  height: 1px;
  background: rgba(255, 255, 255, 0.55);
  content: "";
}

.hero-copy {
  width: min(720px, 100%);
  color: #ffffff;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--clay);
  letter-spacing: 0.09em;
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .section-kicker {
  color: #f5cc74;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

h1 {
  max-width: 18ch;
  font-size: clamp(2.65rem, 5.3vw, 4.4rem);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3.35rem);
}

h3 {
  font-size: 1.22rem;
}

.hero p:not(.section-kicker) {
  max-width: 60ch;
  margin: 18px 0 0;
  color: #edf7ee;
  font-size: 1.18rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.how-it-works-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  width: min(1240px, calc(100% - 32px));
  margin: clamp(28px, 5vw, 72px) auto 52px;
  overflow: hidden;
  border: 1px solid rgba(23, 36, 33, 0.14);
  border-radius: 24px;
  background: #eef5f4;
  box-shadow: var(--shadow-soft);
}

.how-it-works-copy {
  align-self: center;
  padding: clamp(32px, 5vw, 68px);
}

.how-it-works-copy h1 {
  color: var(--ink);
}

.how-it-works-copy p:not(.section-kicker) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.how-it-works-animation {
  display: block;
  width: 100%;
  height: auto;
  align-self: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  color: #ffffff;
  background: var(--water);
  box-shadow: 3px 3px 0 var(--sun);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button-secondary {
  color: var(--ink);
  background: rgba(247, 244, 234, 0.92);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: 2px solid var(--sun);
  outline-offset: 3px;
}

.button-primary:hover {
  background: var(--deep-water);
  box-shadow: 5px 5px 0 var(--sun);
}

.button-danger {
  color: #ffffff;
  background: var(--clay);
  border-color: var(--clay);
}

.top-story,
.content-section,
.guide-section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 76px;
}

.content-section[id],
.guide-section[id] {
  scroll-margin-top: 104px;
}

.top-story {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: clamp(28px, 5vw, 72px);
  margin-top: 52px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(23, 36, 33, 0.14);
  border-radius: 24px;
  background: var(--mist);
  box-shadow: var(--shadow-soft);
}

.top-story p:not(.section-kicker),
.guide-intro {
  margin: 16px 0 0;
  color: var(--muted);
}

.story-facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.story-facts div {
  padding: 16px 18px;
  border: 1px solid rgba(23, 36, 33, 0.13);
  border-radius: 14px;
  background: var(--surface);
}

.story-facts dt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.story-facts dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.story-grid,
.guide-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.story-card,
.guide-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(23, 36, 33, 0.13);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(23, 36, 33, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.story-card:hover,
.guide-card:hover {
  transform: translateY(-5px);
  border-color: rgba(23, 106, 120, 0.42);
  box-shadow: var(--shadow-soft);
}

.story-card p:not(.tag),
.guide-card p:not(.tag) {
  margin: 12px 0 0;
  color: var(--muted);
}

.story-card span {
  display: inline-block;
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.story-card:nth-child(2) {
  background: linear-gradient(145deg, #ffffff, #f0f7f4);
}

.story-card:nth-child(3) {
  background: linear-gradient(145deg, #ffffff, #fff8e8);
}

.tag {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

.tag-blue {
  background: var(--water);
}

.tag-green {
  background: var(--reed);
}

.tag-yellow {
  color: var(--ink);
  background: var(--sun);
}

.topic-band {
  padding: clamp(36px, 6vw, 66px) 0;
  border-top: 1px solid rgba(23, 36, 33, 0.15);
  border-bottom: 1px solid rgba(23, 36, 33, 0.15);
}

.installation-band {
  border-top: 1px solid rgba(23, 36, 33, 0.15);
}

.hardware-band {
  border-bottom: 0;
}

.setup-preflight {
  padding-block: clamp(36px, 6vw, 66px);
  border-top: 1px solid rgba(23, 36, 33, 0.15);
}

.setup-fact-grid,
.setup-checklist,
.placement-grid,
.limitations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.setup-fact {
  padding: 20px;
  border: 1px solid rgba(23, 36, 33, 0.13);
  border-radius: 16px;
  background: var(--surface);
}

.setup-fact .tag {
  margin: 0 0 10px;
}

.setup-fact h3,
.setup-checklist strong,
.limitations-grid h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.setup-fact p:not(.tag),
.setup-checklist span,
.limitations-grid p,
.protection-link p:not(.tag) {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.setup-checklist {
  margin-top: 14px;
}

.setup-checklist div {
  padding: 16px 18px;
  border-radius: 12px;
  background: #e6f3f4;
}

.setup-checklist strong,
.setup-checklist span {
  display: block;
}

/* Keep the installation guide's content bands on one vertical rhythm. */
.install-page > .content-section,
.install-page > .guide-section {
  margin-bottom: 0;
  padding-block: clamp(36px, 6vw, 66px);
}

.install-page > .guide-section {
  border-top: 1px solid rgba(23, 36, 33, 0.15);
}

.hardware-cost {
  max-width: 76ch;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.hardware-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hardware-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(23, 36, 33, 0.13);
  border-radius: 16px;
  background: var(--surface);
}

.hardware-card img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 10px;
  background: #f4f3ed;
}

.hardware-card .tag {
  margin-bottom: 8px;
}

.hardware-card h3 {
  margin: 0;
  font-size: 1rem;
}

.hardware-card p:not(.tag) {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.hardware-card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--water);
  font-size: 0.9rem;
  font-weight: 800;
}

.hardware-assumption {
  padding: 8px 10px;
  border-left: 3px solid var(--sun);
  background: #fff8e8;
}

.topic-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.topic-list a {
  display: grid;
  place-items: center;
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(23, 36, 33, 0.17);
  border-radius: 16px;
  background: var(--surface);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.topic-list a:nth-child(2n) {
  background: #e6f3f4;
}

.topic-list a:nth-child(3n) {
  background: #fff3cc;
}

.topic-list a:nth-child(5n) {
  background: #e8f1df;
}

.topic-list a:hover,
.topic-list a:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  outline: none;
}

.os-requirements {
  max-width: 780px;
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid #e6c66d;
  border-left: 5px solid var(--sun);
  border-radius: 12px;
  background: #fff8e8;
}

.os-requirements .tag {
  margin: 0 0 8px;
}

.os-requirements h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
}

.os-requirements p:not(.tag) {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.install-command-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 10px;
  border: 1px solid rgba(23, 36, 33, 0.16);
  border-radius: 16px;
  background: var(--ink);
}

.install-command {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 8px;
  overflow-x: auto;
  color: #ffffff;
  font-size: clamp(0.82rem, 2vw, 1rem);
}

.install-copy-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.install-copy-button:hover,
.install-copy-button:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.install-copy-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.install-note {
  max-width: 72ch;
  margin: 14px 0 0;
  color: var(--muted);
}

.guide-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.placement-guide,
.limitations-guide {
  padding-block: clamp(36px, 6vw, 66px);
}

.placement-grid .guide-card {
  min-height: 100%;
}

.limitations-content {
  display: grid;
  gap: 18px;
}

.limitations-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.limitations-grid article {
  padding: 16px;
  border: 1px solid rgba(23, 36, 33, 0.13);
  border-radius: 14px;
  background: var(--surface);
}

.protection-link {
  padding: 20px;
  border-radius: 16px;
  background: #e8f1df;
}

.protection-link .tag {
  margin: 0 0 8px;
}

.protection-link h3 {
  margin: 0;
  font-size: 1.1rem;
}

.protection-link .button {
  margin-top: 16px;
}

.guide-card {
  border-top: 5px solid var(--moss);
}

.video-page-hero {
  width: min(1120px, calc(100% - 32px));
  margin: clamp(60px, 9vw, 120px) auto 64px;
}

.video-page-hero h1 {
  max-width: 16ch;
  color: var(--ink);
}

.video-page-hero p:not(.section-kicker) {
  max-width: 64ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.video-guide-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.video-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px;
  border: 1px solid rgba(23, 36, 33, 0.13);
  border-radius: 18px;
  background: var(--surface);
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 16px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #111b19;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card p:not(.tag) {
  margin: 12px 0 0;
  color: var(--muted);
}

.affiliate-disclosure {
  max-width: 72ch;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

.deterrent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.deterrent-card {
  overflow: hidden;
  border: 1px solid rgba(23, 36, 33, 0.13);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(23, 36, 33, 0.04);
}

.deterrent-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #ffffff;
}

.deterrent-card-copy {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(22px, 3vw, 30px);
}

.deterrent-card-copy h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.deterrent-card-copy p:not(.tag) {
  margin: 12px 0 0;
  color: var(--muted);
}

.deterrent-card-copy .button {
  align-self: flex-start;
  margin-top: 24px;
}

.deterrent-overview {
  margin-bottom: clamp(56px, 8vw, 92px);
}

.deterrent-guide {
  margin-bottom: clamp(56px, 8vw, 92px);
}

.deterrent-principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(20, 40, 37, 0.14);
  border-radius: 16px;
  background: rgba(20, 40, 37, 0.14);
}

.deterrent-principles article {
  min-height: 100%;
  padding: 24px;
  background: var(--surface);
}

.deterrent-principles span {
  color: var(--water);
  font-family: Iowan Old Style, Georgia, serif;
  font-size: 1.15rem;
  font-weight: 800;
}

.deterrent-principles h3 {
  margin-top: 14px;
  font-size: 1.22rem;
}

.deterrent-principles p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.deterrent-safety {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto clamp(56px, 8vw, 92px);
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(185, 86, 63, 0.28);
  border-radius: 18px;
  background: linear-gradient(135deg, #fbf0e4, #f8f6ee);
}

.deterrent-safety h2 {
  max-width: 20ch;
}

.deterrent-safety > p:not(.section-kicker) {
  max-width: 68ch;
  margin: 16px 0 0;
  color: var(--muted);
}

.deterrent-examples {
  margin-bottom: clamp(64px, 9vw, 110px);
}

.deterrent-pond-stage {
  margin-bottom: 28px;
}

.deterrent-faq {
  margin-bottom: clamp(64px, 9vw, 110px);
}

.faq-list {
  display: grid;
  gap: 10px;
  max-width: 880px;
}

.faq-list details {
  border: 1px solid rgba(20, 40, 37, 0.14);
  border-radius: 12px;
  background: var(--surface);
}

.faq-list summary {
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 700;
}

.faq-list p {
  max-width: 72ch;
  margin: 0;
  padding: 0 24px 20px;
  color: var(--muted);
}

.site-footer {
  padding: 42px clamp(16px, 5vw, 64px);
  color: #ffffff;
  background: linear-gradient(135deg, var(--night), #173b34);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer .button {
  border-color: rgba(255, 255, 255, 0.44);
}

.pair-page {
  display: grid;
  gap: clamp(48px, 10vw, 120px);
  min-height: 100vh;
  padding: clamp(24px, 5vw, 64px);
  background: linear-gradient(145deg, #e4efdf 0%, var(--paper) 55%, #e6f3f4 100%);
}

.pair-card {
  width: min(100%, 640px);
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid rgba(23, 36, 33, 0.14);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pair-card p:not(.section-kicker) {
  max-width: 52ch;
  margin: 18px 0 0;
  color: var(--muted);
}

.pair-card .button {
  margin-top: 24px;
}

.pair-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pair-actions .button {
  margin-top: 24px;
}

.dashboard-page {
  width: min(1120px, calc(100% - 32px));
  min-height: calc(100vh - 77px);
  margin: 0 auto;
  padding: clamp(54px, 8vw, 100px) 0;
}

.dashboard-heading > p:not(.section-kicker) {
  max-width: 62ch;
  color: var(--muted);
}

.device-overview,
.device-content {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.device-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.device-content {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 64px;
  align-items: start;
}

.device-primary-grid,
.device-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.device-utility-grid {
  display: grid;
  gap: 16px;
}

.device-primary-grid > .device-camera,
.device-settings-grid > .settings-card,
.device-settings-grid > .device-activity-filters,
.device-content > .device-activity {
  width: 100%;
  margin: 0;
}

.dashboard-list-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(23, 36, 33, 0.14);
}

.dashboard-list-heading .button {
  flex: 0 0 auto;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.device-card {
  padding: 28px;
  border: 1px solid rgba(23, 36, 33, 0.14);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.device-card h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.device-card p:not(.tag) {
  color: var(--muted);
}

.device-card .button {
  width: 100%;
  margin-top: 22px;
}

.device-card .button-danger {
  margin-left: 0;
}

.device-remove-trigger {
  margin-top: 16px;
  padding: 0;
  color: var(--clay);
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.device-remove-trigger:hover,
.device-remove-trigger:focus-visible {
  color: var(--ink);
}

.device-removal-confirmation {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--clay) 45%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--clay) 8%, var(--surface));
}

.device-removal-confirmation p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.device-removal-confirmation div {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.device-removal-confirmation .button {
  width: auto;
  margin-top: 0;
}

.device-health-card {
  --health-accent: var(--water);
  --health-tint: rgba(10, 104, 117, 0.08);
  width: 100%;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid rgba(20, 40, 37, 0.14);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--surface), var(--health-tint));
  box-shadow: var(--shadow-soft);
}

.device-health-card-online {
  --health-accent: var(--reed);
  --health-tint: rgba(45, 101, 74, 0.1);
}

.device-health-card-offline {
  --health-accent: var(--clay);
  --health-tint: rgba(180, 75, 59, 0.11);
}

.device-health-card-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.device-health-card h2 {
  margin: 2px 0 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.device-health-state {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--health-accent) 42%, transparent);
  border-radius: 999px;
  color: var(--health-accent);
  background: color-mix(in srgb, var(--health-accent) 10%, var(--surface));
  font-size: 0.88rem;
  font-weight: 800;
}

.device-health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--health-accent) 14%, transparent);
}

@media (prefers-reduced-motion: no-preference) {
  .device-health-card-online .device-health-dot {
    animation: device-health-online-pulse 1.8s ease-out infinite;
  }

  @keyframes device-health-online-pulse {
    0%,
    100% {
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--health-accent) 14%, transparent);
    }

    50% {
      box-shadow: 0 0 0 8px color-mix(in srgb, var(--health-accent) 0%, transparent);
    }
  }
}

.device-health-last-seen {
  margin: 18px 0 0;
  color: var(--muted);
}

.device-health-last-seen strong {
  color: var(--ink);
}

.device-health-telemetry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 24px 0 0;
  border: 1px solid rgba(20, 40, 37, 0.1);
  border-radius: 12px;
  background: rgba(252, 252, 249, 0.68);
}

.device-health-telemetry div {
  min-width: 0;
  padding: 15px 18px;
}

.device-health-telemetry div:not(:first-child) {
  border-left: 1px solid rgba(20, 40, 37, 0.1);
}

.device-health-telemetry dt,
.device-health-meta dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.device-health-telemetry dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 800;
}

.device-health-warning {
  margin: 24px 0 0;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--clay) 35%, transparent);
  border-radius: 12px;
  background: rgba(180, 75, 59, 0.08);
}

.device-health-warning .section-kicker {
  color: var(--clay);
}

.device-health-warning ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.device-health-warning li + li {
  margin-top: 4px;
}

.device-health-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 20px 0 0;
}

.device-health-meta div {
  display: flex;
  gap: 7px;
  align-items: baseline;
  min-width: 0;
}

.device-health-meta dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.device-name-meta dd,
.device-name-editor {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.device-name-editor input {
  width: min(24ch, 48vw);
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.device-name-icon {
  display: inline-grid;
  width: 30px;
  height: 30px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--water);
  background: var(--surface);
  cursor: pointer;
}

.device-name-icon:disabled {
  cursor: wait;
  opacity: 0.55;
}

.device-name-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.device-name-error {
  color: var(--clay);
  font-size: 0.8rem;
}

.device-activity {
  width: 100%;
  overflow: hidden;
  margin-top: 28px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(23, 36, 33, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.device-camera {
  width: min(100%, 760px);
  margin-top: 34px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(13, 72, 83, 0.4);
  border-radius: 22px;
  color: #f5fbf7;
  background: radial-gradient(circle at 86% 14%, rgba(239, 184, 79, 0.18), transparent 18rem), linear-gradient(135deg, var(--night), var(--deep-water));
  box-shadow: var(--shadow);
}

.device-camera h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.device-camera p:not(.section-kicker) {
  color: rgba(245, 251, 247, 0.78);
}

.false-alert-areas h2 {
  margin: 4px 0 10px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.false-alert-areas > p:not(.section-kicker) {
  color: var(--muted);
}

.false-alert-areas .ignored-area-list {
  margin: 20px 0 0;
}

.device-camera .button {
  margin-top: 8px;
}

.device-camera-image {
  position: relative;
  margin-top: 20px;
}

.device-camera img {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.device-camera-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(4, 24, 29, 0.48);
  pointer-events: none;
}

.device-camera-loading span {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(245, 251, 247, 0.34);
  border-top-color: #f5fbf7;
  border-radius: 50%;
  animation: device-camera-loading-spin 800ms linear infinite;
}

@keyframes device-camera-loading-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .device-camera-loading span { animation: none; }
}

.ignored-area-preview {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  border-radius: 14px;
  background: #172421;
}

.ignored-area-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.ignored-area-overlay,
.ignored-area-candidate {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: start;
  justify-content: start;
  min-width: 0;
  min-height: 0;
  padding: 4px;
  border: 2px solid #f4ba45;
  color: #172421;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  background: rgba(244, 186, 69, 0.2);
}

.ignored-area-candidate {
  cursor: pointer;
  border-color: #b94a35;
  color: #ffffff;
  background: rgba(185, 74, 53, 0.35);
}

.ignored-area-candidate:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.ignored-area-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.ignored-area-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.device-activity h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.activity-window {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.activity-window select {
  padding: 7px 10px;
  border: 1px solid rgba(23, 36, 33, 0.26);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.activity-list {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  display: grid;
  grid-template-columns: minmax(0, 150px) max-content minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 15px 12px;
  border-top: 1px solid var(--line);
}

.activity-list li:nth-child(even) {
  background: rgba(228, 239, 223, 0.32);
}

.activity-list time {
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.activity-level {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--water);
  font-size: 0.72rem;
  font-weight: 800;
}

.activity-message {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.activity-heartbeat-summary > strong {
  display: block;
  color: var(--deep-water);
}

.activity-heartbeat-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 8px 0 0;
}

.activity-heartbeat-summary dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.activity-heartbeat-summary dt {
  color: var(--muted);
}

.activity-heartbeat-summary dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.activity-warning {
  color: var(--ink);
  background: var(--sun);
}

.activity-error,
.activity-critical {
  background: var(--clay);
}

.pair-code-card {
  width: min(100%, 620px);
  margin-top: 38px;
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid rgba(23, 36, 33, 0.14);
  border-radius: 22px;
  background: linear-gradient(135deg, var(--mist), #f8f3df);
  box-shadow: var(--shadow-soft);
}

.pair-code-card h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.pair-code-card > p:not(.section-kicker),
.pair-code-card form,
.pair-code-card form label,
.pair-code-card form input,
.pair-code-card form button {
  display: block;
}

.pair-code-card > p:not(.section-kicker),
.pair-code-card form {
  margin-top: 14px;
}

.pair-code-card input {
  width: 100%;
  margin: 6px 0 14px;
  padding: 12px;
  border: 1px solid rgba(23, 36, 33, 0.34);
  border-radius: 12px;
  background: var(--surface);
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pair-code-actions {
  display: flex;
  gap: 8px;
}

.pair-code-actions .button {
  width: auto;
}

.pairing-confirmation {
  margin-top: 20px;
}

.pairing-confirmation .button + .button {
  margin-left: 8px;
}

.pairing-message {
  color: var(--clay);
  font-weight: 700;
}

.help-form-section {
  width: min(640px, calc(100% - 32px));
  margin: 0 auto 76px;
}

.help-coral-guide {
  margin-bottom: 24px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(13, 72, 83, 0.35);
  border-radius: 20px;
  background: linear-gradient(145deg, #eff8f5, #ffffff);
  box-shadow: var(--shadow-soft);
}

.help-coral-guide h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.help-coral-guide > p:not(.section-kicker) {
  color: var(--muted);
}

.help-coral-guide ol {
  display: grid;
  gap: 10px;
  margin: 20px 0;
  padding-left: 24px;
}

.help-coral-note {
  padding: 14px 16px;
  border-left: 3px solid var(--water);
  border-radius: 0 10px 10px 0;
  background: rgba(23, 106, 120, 0.08);
  font-size: 0.92rem;
  font-weight: 700;
}

.settings-card {
  width: min(100%, 640px);
  margin-top: 34px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(23, 36, 33, 0.13);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.settings-toggle {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  cursor: pointer;
}

.settings-toggle input {
  width: 22px;
  height: 22px;
  margin: 4px 0 0;
  accent-color: var(--water);
}

.settings-toggle span {
  display: grid;
  gap: 4px;
}

.settings-toggle small {
  color: var(--muted);
  font-size: 0.95rem;
}

.device-notification-card {
  width: min(100%, 760px);
}

.device-notification-card h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.device-notification-card > p:not(.section-kicker) {
  color: var(--muted);
}

.device-notification-card .settings-toggle {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.notification-override-note {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.help-form {
  display: grid;
  gap: 20px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(23, 36, 33, 0.13);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.help-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.help-form input,
.help-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(23, 36, 33, 0.26);
  border-radius: 10px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.help-form textarea {
  min-height: 160px;
  resize: vertical;
}

.help-form input:focus,
.help-form textarea:focus {
  border-color: var(--water);
  outline: 2px solid rgba(23, 106, 120, 0.2);
  outline-offset: 2px;
}

.help-form .button {
  justify-self: start;
}

.help-status {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.footer-support {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

@media (max-width: 860px) {
  .how-it-works-hero {
    grid-template-columns: 1fr;
  }

  .how-it-works-animation {
    min-height: 0;
  }

  .site-header,
  .top-story,
  .guide-section {
    grid-template-columns: 1fr;
  }

  .site-header {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
  }

  .dashboard-list-heading {
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .account-dropdown {
    right: auto;
    left: 0;
  }

  .hero {
    min-height: 560px;
    background-position: 62% center;
  }

  .hero::after {
    width: 42vw;
  }

  .story-grid,
  .guide-list,
  .deterrent-principles,
  .setup-fact-grid,
  .setup-checklist,
  .placement-grid,
  .hardware-grid,
  .video-grid,
  .deterrent-grid,
  .device-grid {
    grid-template-columns: 1fr;
  }

  .activity-list li {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .activity-heartbeat-summary dl {
    grid-template-columns: 1fr;
  }

  .device-camera,
  .device-activity {
    width: 100%;
  }

  .topic-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .limitations-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .pair-page {
    padding: 10px 12px 24px;
    gap: 10px;
    align-content: start;
  }

  .pair-card {
    padding: 20px;
    border-radius: 16px;
  }

  .pair-card .button {
    margin-top: 18px;
  }

  body {
    font-size: 16px;
  }

  .hero {
    min-height: 520px;
  }

  .top-story,
  .content-section,
  .guide-section,
  .video-page-hero {
    width: min(100% - 24px, 1120px);
  }

  .site-nav a {
    padding-inline: 8px;
  }

  .top-story {
    padding: 20px;
  }

  .topic-list {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .hero-actions .button {
    width: 100%;
  }

  .dashboard-page {
    width: min(100% - 24px, 1120px);
  }

  .device-card,
  .device-health-card,
  .device-camera,
  .device-activity,
  .pair-code-card {
    padding: 22px;
    border-radius: 16px;
  }

  .pair-code-actions {
    flex-direction: column;
  }

  .pair-code-actions .button {
    width: 100%;
  }
}

/* Product surface refinements */
:root {
  --ink: #142825;
  --muted: #5d6d66;
  --paper: #f4f3ed;
  --surface: #fcfcf9;
  --water: #0a6875;
  --deep-water: #074653;
  --reed: #2d654a;
  --line: #d7d8cf;
  --shadow: 0 24px 64px rgba(12, 35, 31, 0.16);
  --shadow-soft: 0 12px 32px rgba(12, 35, 31, 0.08);
}

body {
  background:
    linear-gradient(90deg, rgba(20, 40, 37, 0.025) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(rgba(20, 40, 37, 0.025) 1px, transparent 1px) 0 0 / 36px 36px,
    var(--paper);
  font-family: Inter, "Avenir Next", "Segoe UI", Arial, sans-serif;
}

h1,
h2,
h3 {
  font-family: Iowan Old Style, Georgia, "Times New Roman", serif;
  letter-spacing: -0.035em;
}

.site-header {
  min-height: 72px;
  padding-block: 10px;
  border-bottom-color: rgba(20, 40, 37, 0.1);
  background: rgba(244, 243, 237, 0.94);
}

.brand {
  gap: 11px;
  letter-spacing: -0.03em;
}

.site-nav {
  gap: 2px;
}

.site-nav a {
  padding-inline: 10px;
  font-size: 0.9rem;
}

.account-action,
.button {
  border-radius: 10px;
}

.account-action {
  border-color: rgba(20, 40, 37, 0.24);
  background: rgba(252, 252, 249, 0.82);
}

.hero {
  align-items: stretch;
  min-height: min(720px, calc(100vh - 72px));
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
  gap: clamp(30px, 7vw, 112px);
  background:
    linear-gradient(90deg, rgba(5, 28, 26, 0.96) 0%, rgba(8, 53, 50, 0.83) 50%, rgba(11, 53, 51, 0.34) 100%),
    url("/diary/media/d72dbc1a850b1880c83d40c1a5622a26a7f9aa3d1808c89c0a12a18e22281457.svg") center / cover no-repeat;
}

.hero::after {
  display: none;
}

.hero-copy {
  align-self: end;
  max-width: 740px;
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid rgba(229, 244, 233, 0.2);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(8, 35, 32, 0.58), rgba(8, 35, 32, 0.1));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.hero h1 {
  max-width: 13ch;
  font-size: clamp(3.25rem, 6.2vw, 5.65rem);
}

.hero .button-primary {
  border-color: #d7e8d8;
  background: #e4efdf;
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--sun);
}

.hero .button-primary:hover {
  background: #ffffff;
}

.hero .button-secondary {
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
  background: rgba(9, 44, 41, 0.3);
}

.hero-console {
  align-self: end;
  display: grid;
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(230, 245, 233, 0.26);
  border-radius: 14px;
  background: rgba(3, 29, 28, 0.74);
  backdrop-filter: blur(14px);
}

.hero-console div {
  padding: 17px 20px;
  border-bottom: 1px solid rgba(230, 245, 233, 0.14);
}

.hero-console div:last-child {
  border-bottom: 0;
}

.hero-console dt {
  color: #abc4b4;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-console dd {
  margin: 2px 0 0;
  color: #ffffff;
  font-family: Iowan Old Style, Georgia, serif;
  font-size: 1.2rem;
}

.button {
  min-height: 46px;
  border-color: rgba(20, 40, 37, 0.72);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button-primary {
  box-shadow: 3px 3px 0 var(--sun);
}

.button-secondary {
  background: var(--surface);
}

.top-story,
.how-it-works-hero,
.story-card,
.guide-card,
.video-card,
.deterrent-card,
.device-card,
.device-activity,
.settings-card,
.help-form,
.pair-code-card {
  border-color: rgba(20, 40, 37, 0.12);
}

.top-story {
  border-radius: 18px;
  background: linear-gradient(135deg, #e5efe4, #f7f7f0);
}

.story-card,
.guide-card,
.video-card,
.deterrent-card {
  border-radius: 14px;
  background: rgba(252, 252, 249, 0.94);
}

.story-card:hover,
.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(12, 35, 31, 0.1);
}

.topic-band {
  border-color: rgba(20, 40, 37, 0.12);
}

.topic-list a {
  min-height: 92px;
  border-radius: 12px;
  background: rgba(252, 252, 249, 0.86);
}

.dashboard-page {
  padding-top: clamp(40px, 7vw, 84px);
}

.dashboard-heading h1 {
  font-size: clamp(2.45rem, 5vw, 4.2rem);
}

.dashboard-list-heading {
  position: relative;
  padding: 0 0 34px;
  border-bottom: 2px solid rgba(20, 40, 37, 0.12);
}

.device-grid {
  gap: 16px;
}

.device-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 26px;
  border-radius: 14px;
  background: linear-gradient(155deg, #fcfcf9, #edf4ed);
}

.device-card::before {
  position: absolute;
  top: 0;
  left: 26px;
  width: 42px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--water);
  content: "";
}

.device-card .button {
  margin-top: auto;
}

.device-camera {
  border-radius: 16px;
}

.device-activity {
  border-radius: 16px;
  background: rgba(252, 252, 249, 0.94);
}

.activity-list li {
  grid-template-columns: minmax(0, 150px) max-content minmax(0, 1fr);
}

.activity-window select {
  border-radius: 8px;
  background: var(--surface);
}

.settings-card {
  border-radius: 16px;
  background: rgba(252, 252, 249, 0.94);
}

.device-notification-card .settings-toggle {
  transition: background 140ms ease;
}

.device-notification-card .settings-toggle:hover {
  background: rgba(228, 239, 223, 0.45);
}

.account-email-test {
  display: grid;
  gap: 20px;
}

.device-deterrent-controls {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(20, 40, 37, 0.14);
  border-radius: 16px;
  background: linear-gradient(145deg, #eff8f5, rgba(252, 252, 249, 0.94));
}

.device-deterrent-controls h2 {
  margin: 2px 0 6px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.device-deterrent-controls > div:first-child > p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
}

.deterrent-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.deterrent-command-actions .button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.deterrent-command-status {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.account-email-test h2 {
  margin: 2px 0 6px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.account-email-test p:not(.section-kicker) {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
}

.device-media-location {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(20, 40, 37, 0.14);
  border-radius: 16px;
  background: rgba(252, 252, 249, 0.94);
}

.device-media-location h2 {
  margin: 2px 0 6px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.device-media-location > p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
}

.device-media-location dl {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
}

.device-media-location dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.device-media-location dt {
  color: var(--muted);
}

.device-media-location dd {
  margin: 0;
}

.device-media-location code {
  color: var(--ink);
  font-size: 0.86rem;
}

.device-media-location .device-media-note {
  margin: 16px 0 0;
}

/* Public homepage: an editorial product view rather than a generic card grid. */
.home-landing {
  padding-bottom: clamp(56px, 9vw, 120px);
}

.home-hero {
  min-height: min(760px, calc(100vh - 72px));
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.8fr);
  align-items: center;
  gap: clamp(36px, 7vw, 120px);
  padding-block: clamp(56px, 9vw, 112px);
  background:
    radial-gradient(circle at 78% 22%, rgba(104, 179, 174, 0.3), transparent 20rem),
    radial-gradient(circle at 12% 90%, rgba(239, 184, 79, 0.16), transparent 26rem),
    linear-gradient(135deg, #082d2b, #0d4645 52%, #123c3d);
}

.home-hero .hero-copy {
  align-self: center;
  max-width: 680px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-hero h1 {
  max-width: 11ch;
  font-size: clamp(3.4rem, 6.5vw, 6.3rem);
}

.home-hero .hero-actions {
  margin-top: 32px;
}

.home-hero-proofs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 24px 0 0;
  padding: 0;
  color: #c8ddd2;
  font-size: 0.9rem;
  font-weight: 700;
  list-style: none;
}

.home-hero-proofs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-hero-proofs li::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f5cc74;
  box-shadow: 0 0 0 4px rgba(245, 204, 116, 0.12);
  content: "";
}

.home-demo {
  position: relative;
  align-self: center;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(225, 244, 235, 0.32);
  border-radius: 22px;
  background: #eef5f4;
  box-shadow: 24px 26px 0 rgba(239, 184, 79, 0.8), 0 28px 68px rgba(0, 0, 0, 0.24);
}

.home-demo img {
  display: block;
  width: 100%;
  min-height: 400px;
  object-fit: cover;
}

.home-demo-status {
  position: absolute;
  z-index: 1;
  top: 18px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(20, 40, 37, 0.16);
  border-radius: 999px;
  background: rgba(252, 252, 249, 0.9);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-demo-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #389765;
  box-shadow: 0 0 0 4px rgba(56, 151, 101, 0.15);
}

.home-demo figcaption {
  padding: 16px 20px;
  border-top: 1px solid rgba(20, 40, 37, 0.12);
  color: var(--muted);
  background: #fcfcf9;
  font-size: 0.9rem;
  font-weight: 700;
}

.home-intro,
.home-workflow,
.home-field-note,
.home-build,
.home-garden {
  width: min(1120px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.home-intro {
  max-width: 850px;
  margin-top: clamp(72px, 11vw, 144px);
  margin-bottom: clamp(48px, 7vw, 88px);
  text-align: center;
}

.home-intro h2,
.home-section-heading h2 {
  max-width: 17ch;
}

.home-intro h2 {
  margin-inline: auto;
}

.home-intro > p:last-child {
  max-width: 65ch;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.home-workflow {
  padding: clamp(32px, 5vw, 58px);
  border: 1px solid rgba(20, 40, 37, 0.13);
  border-radius: 20px;
  background: #e6efea;
}

.home-section-heading > p:not(.section-kicker) {
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--muted);
}

.home-workflow ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: clamp(34px, 5vw, 58px) 0 0;
  padding: 0;
  list-style: none;
}

.home-workflow li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 0 clamp(20px, 3vw, 36px);
  border-left: 1px solid rgba(20, 40, 37, 0.18);
}

.home-workflow li:first-child {
  padding-left: 0;
  border-left: 0;
}

.home-workflow li:last-child {
  padding-right: 0;
}

.home-workflow li > span {
  color: var(--water);
  font-family: Iowan Old Style, Georgia, serif;
  font-size: 1.15rem;
  font-weight: 800;
}

.home-workflow h3 {
  font-size: 1.3rem;
}

.home-workflow li p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.home-field-note {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  align-items: center;
  gap: clamp(36px, 8vw, 104px);
  margin-top: clamp(76px, 11vw, 144px);
}

.home-field-note figure {
  position: relative;
  margin: 0;
}

.home-field-note figure::after {
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 44%;
  height: 36%;
  border: 1px solid rgba(20, 40, 37, 0.16);
  background: #e4efdf;
  content: "";
  z-index: -1;
}

.home-field-note img {
  display: block;
  width: 100%;
  aspect-ratio: 1.26;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.home-field-note h2,
.home-build h2 {
  max-width: 14ch;
}

.home-field-note p:not(.section-kicker),
.home-build p:not(.section-kicker) {
  margin: 18px 0 0;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  gap: 8px;
  margin-top: 24px;
  color: var(--water);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.home-build {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(36px, 7vw, 88px);
  margin-top: clamp(76px, 11vw, 144px);
  padding: clamp(32px, 6vw, 68px);
  border-radius: 20px;
  color: #eef5ee;
  background: linear-gradient(135deg, #123d39, #0b5c64);
}

.home-build .section-kicker {
  color: #f5cc74;
}

.home-build h2 {
  color: #ffffff;
}

.home-build p:not(.section-kicker) {
  color: #cce0d6;
}

.home-build .button {
  margin-top: 28px;
}

.home-build dl {
  display: grid;
  gap: 1px;
  align-self: center;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(230, 245, 233, 0.2);
  border-radius: 14px;
  background: rgba(3, 29, 28, 0.36);
}

.home-build dl div {
  padding: 17px 20px;
  border-bottom: 1px solid rgba(230, 245, 233, 0.14);
}

.home-build dl div:last-child {
  border-bottom: 0;
}

.home-build dt {
  color: #abc4b4;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-build dd {
  margin: 3px 0 0;
  color: #ffffff;
  font-family: Iowan Old Style, Georgia, serif;
  font-size: 1.22rem;
}

.home-checks {
  margin-top: clamp(76px, 11vw, 144px);
  margin-bottom: clamp(76px, 10vw, 132px);
}

.home-checks .section-heading {
  align-items: end;
}

.home-checks .text-link {
  margin-top: 0;
}

.home-garden {
  text-align: center;
}

.home-garden .home-section-heading {
  max-width: 760px;
  margin: 0 auto 36px;
}

.home-garden .home-section-heading h2 {
  margin-inline: auto;
}

.home-garden .home-section-heading > p:not(.section-kicker) {
  margin-inline: auto;
}

.home-garden > .button {
  margin-top: 28px;
}

@media (max-width: 860px) {
  .home-hero,
  .home-field-note,
  .home-build {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: 0;
  }

  .home-demo {
    max-width: 620px;
    justify-self: start;
  }

  .home-workflow ol {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .home-workflow li,
  .home-workflow li:first-child,
  .home-workflow li:last-child {
    padding: 0 0 24px;
    border: 0;
    border-bottom: 1px solid rgba(20, 40, 37, 0.18);
  }

  .home-workflow li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .home-field-note figure {
    max-width: 680px;
  }
}

@media (max-width: 520px) {
  .home-hero {
    width: 100%;
    min-height: 0;
    padding: 48px 24px 64px;
  }

  .home-hero h1 {
    font-size: clamp(3rem, 14vw, 4.35rem);
  }

  .home-demo {
    box-shadow: 12px 14px 0 rgba(239, 184, 79, 0.8), 0 22px 48px rgba(0, 0, 0, 0.22);
  }

  .home-demo img {
    min-height: 0;
  }

  .home-intro,
  .home-workflow,
  .home-field-note,
  .home-build,
  .home-garden {
    width: min(100% - 24px, 1120px);
  }

  .home-workflow,
  .home-build {
    padding: 26px;
  }

  .home-checks .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-checks .text-link {
    margin-top: 16px;
  }

  .home-garden > .button,
  .home-build .button {
    width: 100%;
  }
}

.account-email-test .test-email-status {
  max-width: none;
}

.test-email-status {
  max-width: 280px;
  margin-top: 10px !important;
  font-size: 0.88rem;
  font-weight: 700;
}

.device-activity-filters {
  display: grid;
  grid-template-columns: 1fr;
  width: min(1120px, calc(100% - 32px));
  gap: 28px;
  margin: 20px auto 64px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(20, 40, 37, 0.14);
  border-radius: 16px;
  background: rgba(252, 252, 249, 0.94);
}

.device-activity-filters h2 {
  margin: 2px 0 6px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.device-camera h2,
.device-notification-card h2,
.false-alert-areas h2,
.account-email-test h2,
.device-activity-filters h2,
.device-activity h2 {
  margin: 2px 0 10px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.device-activity-filters p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
}

.activity-filter-suggestions,
.activity-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.activity-filter-form {
  align-items: end;
}

.activity-filter-form label {
  display: grid;
  flex: 1 1 100%;
  gap: 6px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.activity-filter-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(20, 40, 37, 0.26);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.ignored-activity-list ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ignored-activity-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.ignored-activity-list code {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.85rem;
}

.ignored-area-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  width: min(1120px, calc(100% - 32px));
  gap: 28px;
  margin: 0 auto 64px;
  padding: 28px;
  border: 1px solid rgba(20, 40, 37, 0.14);
  border-radius: 14px;
  background: rgba(252, 252, 249, 0.94);
}

.ignored-area-preview h2 {
  margin: 2px 0 6px;
  font-size: 1.4rem;
}

.ignored-area-preview p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
}

.ignored-area-image {
  position: relative;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--night);
}

.ignored-area-image img {
  display: block;
  width: 100%;
}

.ignored-area-box {
  position: absolute;
  display: block;
  min-width: 24px;
  min-height: 24px;
  border: 3px solid #efb84f;
  background: rgba(239, 184, 79, 0.16);
  box-shadow: 0 0 0 1px rgba(20, 40, 37, 0.55);
}

.ignored-area-box b {
  position: absolute;
  top: -27px;
  left: -3px;
  padding: 3px 7px;
  white-space: nowrap;
  color: var(--ink);
  background: #efb84f;
  font-size: 0.73rem;
}

.ignored-area-source-box {
  position: absolute;
  display: block;
  min-width: 24px;
  min-height: 24px;
  border: 3px solid #4bba75;
  background: rgba(75, 186, 117, 0.08);
  box-shadow: 0 0 0 1px rgba(20, 40, 37, 0.55);
}

.ignored-area-source-box b {
  position: absolute;
  top: -27px;
  left: -3px;
  padding: 3px 7px;
  white-space: nowrap;
  color: #fff;
  background: #287747;
  font-size: 0.73rem;
}

.ignored-area-preview-empty {
  margin-top: 18px !important;
  padding: 20px;
  border: 1px dashed rgba(20, 40, 37, 0.28);
  border-radius: 10px;
}

.ignored-area-preview-list ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ignored-area-preview-list li {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.ignored-area-preview-list small {
  color: var(--muted);
}

.ignored-area-preview-list .button {
  justify-self: start;
  margin-top: 5px;
}

/* The preview is portalled into the existing false-alert card. */
.ignored-area-preview {
  grid-template-columns: 1fr;
  width: 100%;
  gap: 20px;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.ignored-area-preview-list ol {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.pair-page {
  background:
    radial-gradient(circle at 82% 10%, rgba(10, 104, 117, 0.18), transparent 28rem),
    linear-gradient(145deg, #eef1e8, var(--paper));
}

.diary-page {
  min-height: calc(100vh - 84px);
  padding: clamp(40px, 7vw, 92px) 16px clamp(72px, 9vw, 128px);
  background:
    radial-gradient(circle at 90% 6%, rgba(239, 184, 79, 0.19), transparent 24rem),
    linear-gradient(180deg, #f4f2e8 0%, #eef4e8 100%);
}

.diary-hero {
  width: min(1120px, 100%);
  margin: 0 auto clamp(48px, 7vw, 92px);
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid rgba(23, 36, 33, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(105deg, rgba(10, 53, 47, 0.98), rgba(24, 95, 83, 0.82)),
    url("/diary/media/d72dbc1a850b1880c83d40c1a5622a26a7f9aa3d1808c89c0a12a18e22281457.svg") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.diary-hero .section-kicker {
  color: #f5cc74;
}

.diary-hero h1 {
  max-width: 13ch;
  color: #ffffff;
}

.diary-hero p:not(.section-kicker) {
  max-width: 58ch;
  margin: 18px 0 0;
  color: #e6f0e5;
  font-size: 1.1rem;
}

.diary-feed {
  display: grid;
  width: min(1000px, 100%);
  margin: 0 auto;
}

.diary-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(260px, 0.95fr);
  gap: clamp(26px, 5vw, 58px);
  align-items: center;
  padding: 0 0 clamp(54px, 8vw, 92px);
}

.diary-entry:not(:last-child)::after {
  position: absolute;
  top: 34px;
  bottom: 0;
  left: -31px;
  width: 1px;
  background: rgba(39, 99, 69, 0.34);
  content: "";
}

.diary-entry-marker {
  position: absolute;
  top: 17px;
  left: -39px;
  z-index: 1;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid rgba(39, 99, 69, 0.42);
  border-radius: 50%;
  background: var(--paper);
}

.diary-entry-marker span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay);
}

.diary-image {
  min-height: 400px;
  margin: 0;
  overflow: hidden;
  border: 9px solid #ffffff;
  border-radius: 5px;
  background: #d6e0d1;
  box-shadow: var(--shadow);
  transform: rotate(-1.25deg);
}

.diary-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
}

.diary-copy {
  padding: 14px 0;
}

.diary-copy time {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--reed);
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.diary-copy h2 {
  max-width: 12ch;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
}

.diary-copy p {
  max-width: 48ch;
  margin: 18px 0 0;
  color: var(--muted);
}

.diary-link {
  display: inline-flex;
  gap: 8px;
  margin-top: 24px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.diary-link:hover,
.diary-link:focus-visible {
  color: var(--water);
  text-decoration: underline;
}

@media (max-width: 860px) {
  .diary-entry {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 58px;
  }

  .diary-entry:not(:last-child)::after,
  .diary-entry-marker {
    display: none;
  }

  .diary-image,
  .diary-image img {
    min-height: min(110vw, 520px);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-console {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-console div {
    padding: 14px;
    border-right: 1px solid rgba(230, 245, 233, 0.14);
    border-bottom: 0;
  }

  .hero-console div:last-child {
    border-right: 0;
  }
}

@media (max-width: 520px) {
  .diary-page {
    padding-top: 24px;
  }

  .diary-hero {
    border-radius: 18px;
  }

  .diary-image {
    border-width: 6px;
    transform: none;
  }

  .site-header {
    min-height: 0;
  }

  .hero-copy {
    padding: 24px;
  }

  .hero h1 {
    font-size: clamp(2.85rem, 15vw, 4.1rem);
  }

  .hero-console {
    grid-template-columns: 1fr;
  }

  .hero-console div,
  .hero-console div:last-child {
    border-right: 0;
    border-bottom: 1px solid rgba(230, 245, 233, 0.14);
  }

  .hero-console div:last-child {
    border-bottom: 0;
  }

  .deterrent-command-actions .button {
    width: 100%;
  }

  .account-email-test > div:last-child .button {
    width: 100%;
  }

  .device-activity-filters {
    width: min(100% - 24px, 1120px);
    grid-template-columns: 1fr;
  }

  .ignored-area-preview {
    width: min(100% - 24px, 1120px);
    grid-template-columns: 1fr;
  }

  .test-email-status {
    max-width: none;
  }
}

@media (max-width: 860px) {
  .device-overview,
  .device-primary-grid,
  .device-settings-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .device-content {
    margin-top: 20px;
  }

  .device-health-card-header {
    align-items: flex-start;
  }

  .device-health-telemetry {
    grid-template-columns: 1fr;
  }

  .device-health-telemetry div + div {
    border-top: 1px solid rgba(20, 40, 37, 0.1);
    border-left: 0;
  }
}

@media (max-width: 520px) {
  .device-health-card-header {
    flex-direction: column;
    gap: 14px;
  }

  .device-health-meta div {
    display: grid;
    gap: 2px;
  }
}

.analytics-consent {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  display: flex;
  width: min(100% - 48px, 680px);
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border: 1px solid rgba(228, 239, 223, 0.34);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(8, 35, 32, 0.96);
  box-shadow: var(--shadow);
}

.analytics-consent strong {
  font-family: Iowan Old Style, Georgia, serif;
  font-size: 1.2rem;
}

.analytics-consent p {
  max-width: 45ch;
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
}

.analytics-consent-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.analytics-consent .button {
  min-height: 40px;
  white-space: nowrap;
}

.analytics-consent .button-secondary {
  border-color: rgba(255, 255, 255, 0.52);
  color: #ffffff;
  background: transparent;
}

.footer-cookie-settings {
  padding: 7px 10px;
  border: 1px solid rgba(20, 40, 37, 0.2);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(252, 252, 249, 0.94);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.footer-legal-link {
  color: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.legal-page {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(52px, 8vw, 96px) 0;
}

.legal-hero {
  padding-bottom: clamp(28px, 5vw, 52px);
  border-bottom: 2px solid rgba(20, 40, 37, 0.12);
}

.legal-hero h1 {
  margin-bottom: 12px;
  font-size: clamp(2.7rem, 6vw, 4.7rem);
}

.legal-hero > p:not(.section-kicker) {
  color: var(--muted);
  font-weight: 700;
}

.legal-content {
  max-width: 74ch;
  padding-top: clamp(30px, 5vw, 56px);
}

.legal-content h2 {
  margin: 38px 0 10px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  color: var(--muted);
  line-height: 1.72;
}

.legal-content code {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.9em;
}

.guides-page,
.guide-page {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(52px, 8vw, 96px) 0;
}

.guides-hero,
.guide-article-hero {
  max-width: 840px;
  margin: 0 auto;
  padding-bottom: 32px;
}

.guides-hero h1,
.guide-article-hero h1 {
  max-width: 24ch;
  margin: 10px 0 18px;
  font-size: clamp(2.25rem, 4.5vw, 3.8rem);
  line-height: 1.08;
  text-wrap: balance;
}

.guides-hero > p:not(.section-kicker),
.guide-article-hero > p:not(.section-kicker) {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.guides-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.guide-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 250px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(20, 40, 37, 0.14);
  border-radius: 18px;
  background: #fffdf6;
}

.guide-preview h3 {
  margin: 16px 0 10px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.1;
}

.guide-preview > p:not(.tag) {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

.guide-preview .text-link {
  margin-top: auto;
}

.guide-article-content {
  max-width: 68ch;
  min-width: 0;
  margin: 0;
  font-size: clamp(1.04rem, 1.35vw, 1.16rem);
}

.guide-article-image {
  max-width: 840px;
  margin: 8px auto 40px;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.guide-article-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}

.guide-article-content section + section {
  margin-top: clamp(34px, 6vw, 58px);
}

.guide-article-content h2 {
  margin: 0 0 14px;
  font-size: clamp(1.65rem, 3.5vw, 2.55rem);
  line-height: 1.08;
}

.guide-article-content p,
.guide-article-content li {
  color: var(--muted);
  line-height: 1.72;
}

.guide-article-content ul {
  padding-left: 1.3em;
}

.guide-table { overflow-x: auto; margin: 24px 0; }
.guide-table table { border-collapse: collapse; width: 100%; min-width: 600px; }
.guide-table caption { text-align: left; font-weight: 700; padding: 12px 0; }
.guide-table th, .guide-table td { padding: 14px; text-align: left; vertical-align: top; border: 1px solid rgba(20, 40, 37, 0.2); }
.guide-table thead { background: #e4efdf; }
.guide-article-image figcaption { padding: 16px; color: var(--muted); }

.guide-article-content li + li {
  margin-top: 0.55em;
}

.guide-article-note {
  margin: clamp(42px, 7vw, 72px) 0;
  padding: clamp(26px, 5vw, 44px);
  border-left: 5px solid var(--water);
  background: #e4efdf;
}

.guide-article-note h2 {
  max-width: 18ch;
}

.guide-article-faq details {
  padding: 17px 0;
  border-top: 1px solid rgba(20, 40, 37, 0.16);
}

.guide-article-faq details:last-child {
  border-bottom: 1px solid rgba(20, 40, 37, 0.16);
}

.guide-article-faq summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.guide-article-faq p {
  margin: 12px 0 0;
}

.guide-article-more {
  max-width: 74ch;
  margin: clamp(36px, 6vw, 64px) auto 0;
  font-weight: 800;
}

.guide-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 840px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.guide-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  margin: 12px 0 64px;
  border: 1px solid rgba(20, 40, 37, 0.14);
  border-radius: 20px;
  background: #e4efdf;
}

.guide-feature > img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.guide-feature > div { padding: clamp(24px, 4vw, 48px); align-self: center; }
.guide-feature h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.15; }
.guide-feature p:not(.section-kicker) { color: var(--muted); line-height: 1.7; }
.guide-feature h2 a, .guide-preview h3 a { color: inherit; text-decoration: none; }
.guide-feature h2 a:hover, .guide-preview h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.guides-section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.guides-section-heading h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.guide-preview .section-kicker { margin: 0; }

.guide-reading-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: clamp(32px, 5vw, 64px);
  margin-top: 32px;
}

.guide-contents { position: sticky; top: 120px; border-top: 2px solid var(--water); padding-top: 20px; font-size: 0.9rem; }
.guide-contents ol { padding-left: 20px; margin: 0 0 24px; }
.guide-contents li { padding: 0 0 12px 4px; line-height: 1.5; }
.guide-contents a { color: var(--ink); text-decoration: none; }
.guide-contents a:hover { text-decoration: underline; }
.guide-article-content section[id] { scroll-margin-top: 120px; }
.guide-related ul { padding: 0; list-style: none; }
.guide-related li { border-top: 1px solid rgba(20, 40, 37, 0.16); }
.guide-related a { display: block; padding: 16px 0; text-decoration: none; font-weight: 600; }
.guide-related a:hover { text-decoration: underline; }
.guide-table:focus-visible, .guide-page a:focus-visible, .guides-page a:focus-visible { outline: 3px solid var(--water); outline-offset: 4px; }

@media (max-width: 860px) {
  .guide-reading-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-contents { position: static; padding: 20px; border-radius: 12px; background: #edf5ef; }
  .guide-article-content { max-width: none; }
  .guide-feature { grid-template-columns: 1fr; }
  .guide-feature > img { height: auto; min-height: 0; max-height: 400px; object-position: center bottom; }
  .guide-article-content section[id] { scroll-margin-top: 24px; }
}

.founder-story {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(40px, 7vw, 86px) 0 clamp(64px, 10vw, 120px);
}

.founder-story-hero {
  max-width: 820px;
  padding: clamp(32px, 6vw, 70px);
  border: 1px solid rgba(20, 40, 37, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 86% 18%, rgba(239, 184, 79, 0.8) 0 4px, transparent 5px),
    radial-gradient(circle at 79% 29%, rgba(239, 184, 79, 0.4) 0 2px, transparent 3px),
    linear-gradient(135deg, #e4efdf, #f8f6ee 62%, #d8ebe7);
  box-shadow: var(--shadow-soft);
}

.founder-story-hero h1 {
  max-width: 13ch;
  margin: 10px 0 18px;
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 0.98;
}

.founder-story-hero > p:not(.section-kicker) {
  max-width: 54ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.founder-story-image {
  margin: clamp(26px, 5vw, 54px) 0 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.founder-story-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.founder-story-copy {
  max-width: 68ch;
  margin: clamp(42px, 8vw, 96px) auto 0;
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
}

.founder-story-copy h2 {
  max-width: 14ch;
  margin: 0 0 28px;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1;
}

.founder-story-copy p {
  margin: 0 0 1.35em;
  color: var(--muted);
}

.founder-story-copy strong {
  color: var(--ink);
}

.founder-story-copy blockquote {
  margin: 1.8em 0;
  padding: clamp(24px, 4vw, 42px);
  border-left: 5px solid var(--water);
  color: var(--ink);
  background: rgba(228, 239, 223, 0.6);
  font-family: Iowan Old Style, Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

@media (max-width: 680px) {
  .analytics-consent {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .analytics-consent-actions {
    flex-direction: column;
  }

  .founder-story {
    width: min(100% - 24px, 1060px);
  }

  .founder-story-hero {
    padding: 28px 24px;
  }

  .guides-page,
  .guide-page {
    width: min(100% - 24px, 960px);
  }

  .guides-list {
    grid-template-columns: 1fr;
  }
}
