:root {
  color-scheme: light;
  --ink: #101b29;
  --muted: #4d5967;
  --paper: #f4f4f4;
  --surface: #fff;
  --line: #c4cbd2;
  --nav: #0e1d33;
  --orange: #ff4c00;
  --teal: #09c7c1;
  --link: #17406a;
  --soft: #fff1e8;
}
.dmca-status { margin-top: 1.5rem; }
.dmca-badge { display: inline-flex; align-items: center; min-height: 44px; }
.dmca-badge img { width: 121px; height: 24px; max-width: 121px; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf3f8;
  --muted: #c3cdd9;
  --paper: #0b1625;
  --surface: #14253b;
  --line: #40546a;
  --link: #8ddbd8;
  --soft: #332b25;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}
body {
  margin: 0;
  font:
    400 17px/1.65 "Open Sans",
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
a {
  color: var(--link);
  text-underline-offset: 0.2em;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
svg {
  max-width: 1.5rem;
  max-height: 1.5rem;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
}
h3 {
  font-size: 1.1rem;
  line-height: 1.4;
}
p,
li,
td,
th,
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}
p {
  max-width: 75ch;
}
ul,
ol {
  padding-left: 1.3em;
}
li + li {
  margin-top: 0.5rem;
}
.wrap {
  width: min(1160px, calc(100% - 40px));
  margin: auto;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 1000;
  background: var(--surface);
  padding: 1rem;
}
.skip:focus {
  top: 1rem;
}
.site-header {
  background: var(--nav);
  color: #fff;
  border-bottom: 1px solid #43536a;
}
.header-row {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 12px 0;
}
.brand {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.brand small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-top: 0.4rem;
  color: #cbd5e1;
}
.header-nav {
  margin-left: auto;
}
.header-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.header-nav li {
  margin: 0;
}
.header-nav a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 0.6rem 0;
}
.header-nav a:hover,
.header-nav a[aria-current="page"] {
  color: #5ee7dc;
  text-decoration: underline;
}
.theme-toggle {
  background: transparent;
  color: #fff;
  border: 1px solid #758394;
  border-radius: 9px;
  padding: 0.5rem 0.8rem;
  min-height: 44px;
}
.theme-toggle[hidden] {
  display: none;
}
.hero {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(8, 15, 25, 0.87), rgba(8, 15, 25, 0.5)),
    url("/bg.jpeg") center/cover no-repeat;
  padding: 72px 0 82px;
}
.hero h1 {
  max-width: 850px;
  text-shadow: 0 2px 5px #000;
}
.hero p {
  font-size: 1.12rem;
  max-width: 64ch;
  text-shadow: 0 1px 4px #000;
}
.hero .age {
  font-size: 0.88rem;
  color: #dbe3ec;
  margin-bottom: 1.5rem;
}
.hero .hero-status {
  font-size: 0.9rem;
  background: rgba(10, 18, 28, 0.8);
  padding: 14px 18px;
  border: 1px solid #617080;
  border-radius: 12px;
  max-width: 65ch;
  margin-top: 2rem;
  margin-bottom: 0;
}
.actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  padding: 0.8rem 1.4rem;
  border-radius: 13px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  background: #cf3f00;
  color: #fff;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}
.hero .button {
  background: var(--orange);
  color: #101b29;
  animation: orange-glow 1.5s ease-out 2;
}
.button:hover {
  background: #ab3400;
  color: #fff;
}
.hero .button:hover {
  background: #dd4300;
  color: #fff;
}
.button.secondary {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(10, 18, 28, 0.85);
}
.button.secondary:hover {
  box-shadow: 0 0 18px #09c7c144;
}
.hero.compact {
  padding: 44px 0 50px;
}
.hero.compact h1 {
  font-size: clamp(1.85rem, 3vw, 2.8rem);
}
.crumbs {
  font-size: 0.9rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.crumbs a {
  color: #dce7f2;
}
.section {
  padding: 3.5rem 0;
}
.section + .section {
  padding-top: 0;
}
.panel {
  background: var(--surface);
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.panel > :last-child {
  margin-bottom: 0;
}
.read-column {
  max-width: 850px;
}
.lede {
  font-size: 1.12rem;
}
.meta {
  color: var(--muted);
  font-size: 0.88rem;
}
.notice {
  padding: 18px 22px;
  border-left: 4px solid var(--orange);
  background: var(--soft);
  border-radius: 0 8px 8px 0;
}
.grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
}
.grid li {
  margin: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}
.grid h3 {
  margin-bottom: 0.7rem;
}
.grid p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}
.grid a {
  font-weight: 600;
}
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  list-style: none;
  padding: 0;
}
.toc li {
  margin: 0;
}
.toc a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 0.5rem 0.9rem;
  text-decoration: none;
  background: var(--surface);
}
.toc a:hover {
  border-color: var(--orange);
}
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: 1rem;
}
td,
th {
  border: 1px solid var(--line);
  text-align: left;
  padding: 14px;
  vertical-align: top;
}
th {
  width: 27%;
  background: var(--soft);
}
.table-scroll {
  overflow: auto;
}
.calculator {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.calculator label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}
.calculator input,
.calculator select {
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  min-height: 46px;
}
.calc-result {
  grid-column: 1/-1;
  display: block;
  padding: 20px;
  background: var(--soft);
  border-radius: 10px;
  font-weight: 700;
}
.calculator .button {
  justify-self: start;
}
.wide {
  grid-column: 1/-1;
}
.faq details {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0;
}
.faq details:last-child {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding-right: 1rem;
}
.faq details p {
  margin: 1rem 0 0;
}
.site-footer {
  background: var(--nav);
  color: #e1e7ef;
  padding: 3rem 0;
}
.site-footer h2 {
  font-size: 1.3rem;
}
.site-footer a {
  color: #9ce2dc;
}
.site-footer .footer-resources {
  margin-block: 2rem;
  padding-block: 1.5rem;
  border-block: 1px solid #40546a;
}
.footer-resources ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1.1rem 1.5rem;
  list-style: none;
  padding: 0;
  margin-block: 1.2rem;
}
.footer-resources li { min-width: 0; }
.footer-resources li > a,
.footer-resources li > strong {
  display: inline-block;
  padding-block: .5rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-underline-offset: .2em;
}
.footer-resources li > span {
  display: block;
  font-size: .9rem;
  color: #c3cdd9;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}
.footer-links li {
  margin: 0;
}
.site-footer .meta {
  color: #c3cdd9;
}
.mobile-nav {
  display: none;
}
.article-section + .article-section {
  margin-top: 2.3rem;
  border-top: 1px solid var(--line);
  padding-top: 2.3rem;
}
.article-section p:last-child {
  margin-bottom: 0;
}
@keyframes orange-glow {
  50% {
    box-shadow: 0 0 23px #ff4c0055;
  }
}
@media (max-width: 800px) {
  .header-row {
    gap: 12px 20px;
  }
  .header-nav {
    order: 3;
    width: 100%;
    margin: 0;
  }
  .header-nav ul {
    gap: 0.6rem 1.4rem;
  }
  .theme-toggle {
    margin-left: auto;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero {
    padding: 48px 0 58px;
  }
  .site-footer {
    padding-bottom: 6.5rem;
  }
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: var(--nav);
    border-top: 1px solid #576579;
    padding: 6px 5px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -3px 14px #0002;
  }
  .mobile-nav a {
    color: #e1e7ef;
    text-align: center;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
  }
  .mobile-nav a[aria-current="page"] {
    background: #24435b;
    color: #fff;
  }
  .mobile-nav a:hover {
    background: #24435b;
  }
}
@media (max-width: 520px) {
  .wrap {
    width: calc(100% - 28px);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 2rem 0;
  }
  .hero {
    padding: 36px 0 46px;
  }
  .hero.compact {
    padding: 30px 0 36px;
  }
  .hero p {
    font-size: 1rem;
  }
  .header-nav a {
    font-size: 0.9rem;
  }
  .header-nav ul {
    gap: 0.3rem 1rem;
  }
  .header-row {
    padding: 12px 0;
  }
  .actions {
    gap: 0.75rem;
  }
  .actions .button {
    flex: 1 1 180px;
  }
  .panel {
    padding: 20px 16px;
  }
  .calculator {
    grid-template-columns: 1fr;
  }
  td,
  th {
    padding: 10px;
    font-size: 0.85rem;
  }
  th {
    width: 34%;
  }
  .brand {
    font-size: 1.1rem;
  }
  .theme-toggle {
    font-size: 0.85rem;
  }
  .notice {
    padding: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
