/* Terms theme
   A "legal paper" look: cream paper, navy ink, serif headings, ruled lines,
   numbered clauses and a burgundy wax-seal accent. Light and dark modes. */

:root {
  --navy: #1d2a44;
  --navy-2: #26365a;
  --navy-3: #3a4c74;
  --seal: #a3312f;
  --seal-2: #86231f;
  --seal-soft: #f6e4e1;
  --gold: #b8913f;
  --gold-soft: #f5ecd6;
  --text: #1e2433;
  --muted: #5b6172;
  --line: #e2dccd;
  --rule: #ece6d8;
  --bg: #f7f3ea;
  --surface: #fffdf8;
  --surface-2: #f1ecdf;
  --link: #8a2a27;
  --link-hover: #5f1a17;
  --radius: 6px;
  --shadow: 0 1px 1px rgba(29, 42, 68, 0.05), 0 6px 18px rgba(29, 42, 68, 0.07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e9e6dd;
    --muted: #a9adb9;
    --line: #2f3a52;
    --rule: #263048;
    --bg: #121826;
    --surface: #182033;
    --surface-2: #1f2940;
    --seal-soft: #3a1f22;
    --gold-soft: #33301f;
    --link: #f0a7a0;
    --link-hover: #ffd2cc;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img,
svg {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.9em;
}

:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.icon {
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.15em;
  flex: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--gold);
  color: var(--navy);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 600px) {
  .wrap {
    padding: 0 1.5rem;
  }
}

.wrap--narrow {
  max-width: 820px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--navy);
  color: #fff;
}

.btn--primary:hover {
  background: var(--navy-2);
  color: #fff;
}

.btn--accent {
  background: var(--seal);
  color: #fff;
}

.btn--accent:hover {
  background: var(--seal-2);
  color: #fff;
}

.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

/* Header */

.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 4px double var(--gold);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--seal);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18), 0 0 0 2px var(--seal);
}

.brand__mark .icon {
  width: 1.2rem;
  height: 1.2rem;
}

.brand__name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand__tld {
  color: var(--gold);
  font-weight: 400;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: #d9deea;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--gold);
}

/* Breadcrumb */

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  list-style: none;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "\00a7";
  margin-right: 0.5rem;
  color: var(--gold);
}

.breadcrumb a {
  color: var(--muted);
}

/* Heroes */

.home-hero,
.page-hero {
  background:
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px),
    var(--surface);
  border-bottom: 1px solid var(--line);
}

.home-hero {
  padding: 3rem 0 2.5rem;
}

.page-hero {
  padding: 1.5rem 0 2.25rem;
}

.page-hero--compact {
  padding: 1.5rem 0 1.75rem;
}

.home-hero h1,
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin: 0.25rem 0 0.75rem;
  color: var(--navy);
  max-width: 22ch;
}

.page-hero--compact h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

@media (prefers-color-scheme: dark) {
  .home-hero h1,
  .page-hero h1 {
    color: #fff;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--seal);
}

@media (prefers-color-scheme: dark) {
  .eyebrow {
    color: var(--link);
  }
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 1.25rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* Search and chips */

.search {
  position: relative;
  max-width: 560px;
  margin: 1.5rem 0 1rem;
}

.search .icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.search input {
  width: 100%;
  font: inherit;
  padding: 0.8rem 1rem 0.8rem 2.7rem;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--navy-3);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.search input:focus {
  outline: none;
  border-bottom-color: var(--seal);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chips a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.93rem;
}

.chips a:hover {
  border-color: var(--seal);
  color: var(--seal);
}

.chips__count {
  font-size: 0.78rem;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0 0.5rem;
  color: var(--muted);
}

/* Listing */

.listing {
  padding-top: 2.25rem;
  padding-bottom: 3rem;
}

.category-group {
  counter-reset: clause;
  margin-bottom: 2.75rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.4rem;
}

.section-head h2 {
  font-size: 1.75rem;
  margin: 0;
}

.section-head__link {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.section-intro {
  color: var(--muted);
  max-width: 75ch;
}

.search-empty {
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  counter-reset: clause;
}

.card {
  counter-increment: clause;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.2rem 1.2rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy-3);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card--templates {
  border-top-color: var(--gold);
}

.card::after {
  content: counter(clause, decimal-leading-zero);
  position: absolute;
  top: 0.55rem;
  right: 0.8rem;
  font-family: var(--serif);
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.6;
}

.card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.card__head > div {
  flex: 1 1 auto;
  min-width: 0;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--navy-3);
  flex: none;
}

@media (prefers-color-scheme: dark) {
  .card__icon {
    color: var(--gold);
  }
}

.card__title {
  font-size: 1.25rem;
  margin: 0;
}

.card__title a {
  color: var(--text);
  text-decoration: none;
}

.card__title a:hover {
  color: var(--link);
}

.card__domain {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.card__badge {
  align-self: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--seal);
  border: 1.5px solid currentColor;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  transform: rotate(-3deg);
  margin-right: 1.4rem;
}

@media (prefers-color-scheme: dark) {
  .card__badge {
    color: var(--link);
  }
}

.card__summary {
  margin: 0;
  font-size: 0.97rem;
  flex: 1 1 auto;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tags li {
  font-size: 0.78rem;
  padding: 0.15rem 0.55rem;
  background: var(--surface-2);
  border-radius: 3px;
  color: var(--muted);
}

.tags--hero {
  margin-top: 0.25rem;
}

.tags--hero li {
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.85rem;
}

.card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 0.7rem;
  border-top: 1px dotted var(--line);
  font-size: 0.93rem;
}

.card__more,
.card__visit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  text-decoration: none;
}

.card__visit {
  color: var(--muted);
  font-weight: 500;
}

/* Sale callout */

.sale-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin: 0 0 3rem;
  padding: 1.75rem;
  background: var(--navy);
  color: #e6e9f2;
  border-radius: var(--radius);
  border: 1px solid var(--navy);
  box-shadow: inset 0 0 0 4px var(--navy), inset 0 0 0 5px rgba(184, 145, 63, 0.6);
}

.sale-callout h2 {
  color: #fff;
  font-size: 1.75rem;
  margin: 0.3rem 0 0.4rem;
}

.sale-callout p {
  margin: 0;
  max-width: 60ch;
}

.sale-callout .eyebrow {
  color: var(--gold);
}

/* Guide and FAQs */

.guide {
  display: grid;
  gap: 2rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 900px) {
  .guide {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.guide h2,
.faqs h2 {
  font-size: 1.6rem;
  margin-top: 0;
}

.faq {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--seal);
}

.faq[open] summary::after {
  content: "\2212";
}

.faq p {
  margin: 0.5rem 0 0.25rem;
  color: var(--muted);
}

/* Category page */

.compare {
  margin-top: 2.5rem;
}

.compare h2 {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  min-width: 640px;
}

.data-table th,
.data-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.data-table thead th {
  font-family: var(--serif);
  font-size: 0.95rem;
  background: var(--surface-2);
  border-bottom: 2px solid var(--line);
}

.data-table tbody tr:last-child > * {
  border-bottom: 0;
}

.yes {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #2f6b3a;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .yes {
    color: #8fd19c;
  }
}

.unknown {
  color: var(--muted);
  font-size: 0.88em;
}

.cross-link {
  margin-top: 2rem;
  font-weight: 600;
}

/* Service page */

.service-layout {
  display: grid;
  gap: 2rem;
  padding-top: 2rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 960px) {
  .service-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 3rem;
  }

  .service-aside {
    position: sticky;
    top: 1rem;
    align-self: start;
  }
}

.service-main {
  min-width: 0;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.toc__title {
  margin: 0 0 0.25rem;
  font-family: var(--serif);
  font-weight: 600;
}

.toc ol {
  margin: 0;
  padding-left: 1.4rem;
}

.prose {
  counter-reset: section;
}

.prose h2 {
  counter-increment: section;
  font-size: 1.6rem;
  margin: 2rem 0 0.6rem;
}

.service-main .prose h2::before {
  content: counter(section) ". ";
  color: var(--seal);
}

@media (prefers-color-scheme: dark) {
  .service-main .prose h2::before {
    color: var(--link);
  }
}

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

.prose h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.4rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose li::marker {
  color: var(--seal);
}

.notice {
  display: flex;
  gap: 0.75rem;
  margin: 2rem 0;
  padding: 1rem 1.2rem;
  background: var(--gold-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.notice .icon {
  margin-top: 0.25rem;
  color: var(--gold);
}

.notice p {
  margin: 0;
}

.faqs {
  margin-top: 2rem;
}

.sources {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.sources h2 {
  font-size: 1.15rem;
}

.sources a {
  overflow-wrap: anywhere;
}

.facts,
.related {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.facts {
  border-top: 3px solid var(--seal);
}

.facts h2,
.related h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.facts dl {
  margin: 0;
}

.facts dl > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px dotted var(--line);
  font-size: 0.93rem;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.facts__sub {
  font-size: 1rem;
  margin: 1rem 0 0.4rem;
}

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.93rem;
}

.doc-list li {
  display: flex;
  gap: 0.45rem;
  padding: 0.2rem 0;
}

.doc-list .icon {
  margin-top: 0.3rem;
  color: var(--muted);
}

.facts__verified {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.related {
  margin-top: 1.25rem;
}

.related ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related li a {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  border-bottom: 1px dotted var(--line);
  text-decoration: none;
}

.related li a strong {
  color: var(--text);
}

.related li a span {
  font-size: 0.85rem;
  color: var(--muted);
}

.related__all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.93rem;
  text-decoration: none;
}

/* Simple pages */

.page-body {
  padding-top: 2rem;
  padding-bottom: 3.5rem;
}

.chips--light {
  margin-top: 1rem;
}

/* Domain sale page */

.page-hero--sale {
  background:
    radial-gradient(circle at 90% 20%, rgba(163, 49, 47, 0.12), transparent 40%),
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px),
    var(--surface);
}

.sale-points {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sale-points li {
  display: flex;
  gap: 0.5rem;
  padding: 0.2rem 0;
}

.sale-points .icon {
  margin-top: 0.3rem;
  color: var(--seal);
}

.sale-form h2 {
  font-size: 1.6rem;
  margin-top: 0;
}

.sale-form__frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Ads */

.ad {
  margin: 2rem 0;
  text-align: center;
}

.ad__label {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Footer */

.site-footer {
  background: var(--navy);
  color: #c9cfdd;
  padding: 2.75rem 0 1.5rem;
  border-top: 4px double var(--gold);
  font-size: 0.93rem;
}

.site-footer a {
  color: #e9ecf4;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.footer-heading {
  font-size: 1.1rem;
  margin: 0 0 0.6rem;
  color: #fff;
}

.footer-heading a {
  color: #fff;
  text-decoration: none;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  padding: 0.15rem 0;
}

.footer-grid li a {
  text-decoration: none;
}

.footer-grid li a:hover {
  text-decoration: underline;
}

.footer-sale {
  background: var(--navy-2);
  border: 1px solid rgba(184, 145, 63, 0.5);
  border-radius: var(--radius);
  padding: 1.25rem;
  align-self: start;
}

.footer-sale p {
  margin: 0 0 1rem;
}

.footer-sale .btn {
  color: #fff;
}

.footer-meta {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--navy-3);
  color: #a9b1c4;
}

.footer-meta p {
  max-width: 85ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.copyright {
  margin-bottom: 0;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .home-hero {
    padding: 2rem 0 1.75rem;
  }

  .sale-callout {
    padding: 1.35rem;
  }

  .facts dl > div {
    grid-template-columns: 6.5rem minmax(0, 1fr);
  }
}
