/* Dr.Fone homepage: shared components and responsive layouts. */

:root {
  --navy: #101c32;
  --blue: #245de8;
  --ink: #15253f;
  --muted: #526176;
  --pale: #f3f5f8;
  --line: #dce3ed;
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font: 17px/1.75 Arial,Helvetica,sans-serif;
  color: var(--ink);
  background: #fff;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid #e6a129;
  outline-offset: 5px;
}

p {
  margin: 0 0 20px;
}

h1, h2, h3 {
  line-height: 1.16;
  letter-spacing: -.035em;
  margin: 0 0 22px;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2.5rem,4.3vw,4.4rem);
}

h2 {
  font-size: clamp(1.9rem,3vw,2.9rem);
}

h3 {
  font-size: 1.22rem;
  letter-spacing: -.02em;
  margin-bottom: 12px;
}

small, .micro {
  font-size: .82rem;
  line-height: 1.6;
}

.container {
  width: min(100% - 64px,1200px);
  margin-inline: auto;
  min-width: 0;
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: -.05em;
  flex-shrink: 0;
  justify-self: start;
}

.brand img {
  width: 36px;
  height: 36px;
}

nav {
  display: flex;
  align-items: center;
  gap: 27px;
  font-size: .87rem;
  font-weight: 700;
  justify-self: center;
}

nav>a:not(.button):hover, footer a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue);
  color: white;
  font-weight: 700;
  font-size: .94rem;
  line-height: 1.35;
  padding: 16px 23px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  max-width: 100%;
  text-align: center;
  white-space: normal;
  transition: background .18s,transform .18s;
  min-height: 48px;
}

.button:hover {
  background: #174bc9;
  transform: translateY(-2px);
}

.button.small {
  padding: 12px 19px;
  min-height: 44px;
}

.button.secondary {
  color: var(--blue);
  background: white;
  border-color: var(--line);
}

.button.secondary:hover {
  background: #eaf0fc;
}

.button.outline {
  background: transparent;
  border-color: #7b8ba6;
  color: #fff;
}

.button.outline:hover {
  background: #253550;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px 0 16px;
}

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

.dark p {
  color: #d1dbee;
}

.dark .eyebrow {
  color: #69d7ee;
}

.eyebrow {
  font-size: .71rem;
  letter-spacing: .18em;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 18px;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: 0;
  background: url('assets/images/hero.webp') center center/cover no-repeat;
  z-index: -2;
}

.hero-copy {
  max-width: 550px;
  padding: 85px 0;
}

.hero-copy>p:not(.eyebrow) {
  max-width: 470px;
}

.hero-copy h1 {
  max-width: 560px;
}

.hero .micro {
  color: #c0cfe6;
  margin-top: 24px;
}

.particles {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.particles i {
  position: absolute;
  top: 24%;
  left: 65%;
  height: 5px;
  width: 5px;
  background: #63dbf4;
  border-radius: 50%;
  box-shadow: 0 0 14px #63dbf4;
  animation: float 8s ease-in-out infinite;
}

.particles i:nth-child(2) {
  top: 63%;
  left: 87%;
  animation-delay: -3s;
}

.particles i:nth-child(3) {
  top: 36%;
  left: 93%;
  animation-delay: -5s;
}

.particles i:nth-child(4) {
  top: 77%;
  left: 61%;
  animation-delay: -2s;
}

.particles i:nth-child(5) {
  top: 15%;
  left: 80%;
  animation-delay: -6s;
}

.section {
  padding: 84px 0;
  scroll-margin-top: 10px;
}

.section:nth-of-type(even):not(.dark):not(#toolkit-downloads) {
  background: var(--pale);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 58px;
  align-items: center;
}

.split>* {
  min-width: 0;
}

.reverse .art {
  order: -1;
}

.art {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--pale);
}

.dark .art {
  background: var(--navy);
}

.art img {
  width: 100%;
  height: auto;
}

.copy>p {
  color: var(--muted);
}

.dark .copy>p {
  color: #cbd6e7;
}

.copy>p.eyebrow {
  color: var(--blue);
}

.dark .copy>p.eyebrow {
  color: #69d7ee;
}

.copy>p:last-child {
  margin-bottom: 0;
}

.icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0 24px;
}

.download-card {
  background: #fff;
  border: 1px solid #cbd7eb;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 10px 28px #14243b05;
}

.download-card .icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
}

.download-card h3 {
  font-size: 1.55rem;
}

.download-card p {
  font-size: .96rem;
  color: var(--muted);
}

.download-card small {
  display: block;
  margin-top: 15px;
  color: var(--muted);
}

.note {
  font-size: .9rem;
  max-width: 850px;
}

.module-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.file-link {
  padding: 8px 15px;
  background: #edf3ff;
  color: #245de8;
  border-radius: 7px;
  font-size: .8rem;
  font-weight: 700;
  border: 1px solid #d5e2fc;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.file-link:hover {
  background: #dce8ff;
}

.table-wrap {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: auto;
  background: white;
}

table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-size: .95rem;
}

caption {
  text-align: left;
  font-weight: 700;
  padding: 20px 24px;
  background: #fff;
}

th, td {
  padding: 20px 24px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

thead th {
  background: #eaf0fc;
}

tbody th {
  width: 35%;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 26px 0;
}

.mini-grid>div {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mini-grid p {
  font-size: .9rem;
  margin: 0;
  color: var(--muted);
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 24px;
  padding: 0;
  margin: 30px 0 0;
}

.steps li {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.steps .icon {
  margin-bottom: 22px;
}

.steps p, .help-grid p {
  font-size: .95rem;
  color: var(--muted);
  margin: 0;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 24px;
  margin-top: 30px;
}

.help-grid article {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.faqs {
  max-width: 900px;
}

.faqs details {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 13px;
}

.faqs summary {
  font-weight: 700;
  cursor: pointer;
  position: relative;
  padding: 22px 52px 22px 24px;
  list-style: none;
  line-height: 1.5;
}

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

.faqs summary:after {
  content: '+';
  position: absolute;
  right: 24px;
  font-size: 1.3rem;
  color: var(--blue);
  top: 18px;
}

.faqs details[open] summary:after {
  content: '−';
}

.faqs details p {
  padding: 0 24px 22px;
  margin: 0;
  color: var(--muted);
}

#get-started .art {
  border-radius: 0;
}

footer {
  background: #0b1425;
  color: #c7d3e5;
  padding: 55px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 45px;
  text-align: center;
}

.footer-grid h2 {
  font-size: .95rem;
  letter-spacing: 0;
  color: white;
}

.footer-grid p {
  font-size: .9rem;
  margin-top: 20px;
  max-width: 320px;
  margin-inline: auto;
}

.footer-grid>div>a:not(.brand) {
  display: block;
  margin: 8px 0;
  font-size: .87rem;
}

.footer-grid .brand {
  color: white;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #27344a;
  padding: 24px 0;
  margin-top: 40px;
  gap: 20px;
}

.back-top {
  padding: 10px 16px;
  border: 1px solid #465570;
  border-radius: 8px;
  font-size: .9rem;
  color: white;
}

.menu-toggle {
  display: none;
}

.skip {
  position: fixed;
  top: -100px;
  left: 15px;
  background: #fff;
  padding: 12px;
  z-index: 100;
}

.skip:focus {
  top: 10px;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  width: min(520px,calc(100% - 32px));
  max-height: 90dvh;
  overflow: auto;
  color: var(--ink);
  box-shadow: 0 20px 80px #0004;
}

dialog::backdrop {
  background: #061124b8;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.dialog-head h2 {
  font-size: 1.7rem;
}

.dialog-close {
  border: 0;
  background: #edf1f7;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  flex-shrink: 0;
}

progress {
  width: 100%;
  height: 8px;
  accent-color: var(--blue);
  display: block;
}

dialog .micro {
  color: var(--muted);
  margin: 18px 0 0;
}

#download-status {
  font-weight: 700;
}

body.menu-open {
  overflow: hidden;
}

#toolkit-downloads {
  background: #eef5ff;
  color: #17243b;
}

.toolkit-downloads>p {
  max-width: 760px;
  color: #526178;
}

.toolkit-downloads>p.eyebrow {
  color: var(--blue);
}

.toolkit-module-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
  margin-top: 24px;
}

.toolkit-module {
  background: #fff;
  border: 1px solid #d7e3f2;
  border-radius: 14px;
  padding: 22px;
  min-width: 0;
  box-shadow: 0 6px 20px rgba(25,58,99,.04);
}

.toolkit-module h3 {
  font-size: 1.05rem;
  margin: 16px 0 0;
  color: #17243b;
}

.toolkit-module .module-links {
  flex-wrap: wrap;
}

@keyframes float {
  50% {
    transform: translate(-25px,35px);
    opacity: .3;
  }
}

@media(min-width:1600px) {
  .hero-art {
    background-size: 1600px auto;
    background-color: #040d22;
  }

  .hero {
    min-height: 680px;
  }
}

@media(max-width:1050px) {
  .header-inner {
    min-height: 74px;
    display: flex;
    justify-content: space-between;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    align-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    background: white;
    border-radius: 9px;
  }

  .menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--ink);
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 25px 32px;
    border-bottom: 1px solid var(--line);
    max-height: calc(100dvh - 74px);
    overflow: auto;
  }

  nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  nav>a {
    padding: 15px;
  }

  .split {
    gap: 32px;
  }

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

  .footer-grid {
    grid-template-columns: 2fr 1fr;
    gap: 32px;
  }

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

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

  .hero {
    display: block;
    min-height: 0;
    padding-bottom: clamp(250px,60vw,480px);
    background: #040d22;
  }

  .hero-copy {
    max-width: 100%;
    padding: 50px 0 24px;
  }

  .hero-copy h1 {
    max-width: 700px;
    font-size: clamp(2.2rem,5.7vw,3.7rem);
  }

  .hero-copy p {
    font-size: 1rem;
  }

  .hero-copy>p:not(.eyebrow) {
    max-width: 600px;
  }

  .hero-art {
    top: auto;
    bottom: 0;
    height: clamp(250px,60vw,480px);
    background-size: auto 100%;
    background-position: 95% bottom;
  }

  .hero .micro {
    margin-bottom: 0;
  }

  .hero .container {
    position: relative;
    z-index: 1;
  }

  .particles {
    top: 55%;
  }
}

@media(max-width:760px) {
  body {
    font-size: 16px;
  }

  .container {
    width: calc(100% - 36px);
  }

  .section {
    padding: 54px 0;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .reverse .art {
    order: 0;
  }

  .eyebrow {
    font-size: .65rem;
  }

  .download-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .download-card {
    padding: 26px;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-grid>div:first-child {
    grid-column: 1/-1;
  }

  .steps {
    gap: 14px;
  }

  .steps li {
    padding: 20px;
  }

  th, td {
    padding: 16px;
    font-size: .85rem;
  }

  caption {
    padding: 16px;
  }

  .footer-bottom {
    align-items: center;
  }

  .art {
    border-radius: 16px;
  }

  .hero .actions {
    margin-top: 24px;
  }
}

@media(max-width:540px) {
  .toolkit-module-grid {
    grid-template-columns: 1fr;
  }
}

@media(max-width:390px) {
  .steps, .mini-grid {
    grid-template-columns: 1fr;
  }

  .button {
    padding: 14px 18px;
  }

  .footer-grid {
    gap: 22px;
  }

  .brand {
    font-size: 1.45rem;
  }

  .hero-copy h1 {
    font-size: 2.15rem;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  .particles {
    display: none;
  }

  .button {
    transition: none;
  }

  .button:hover {
    transform: none;
  }
}

/* Dr.Fone site pages: components added for guides, articles and policy pages.
   The homepage rules above are unchanged; this section only styles the new
   components used by the additional pages. */

.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.dropdown-toggle:after {
  content: '';
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(16, 28, 50, .14);
  min-width: 280px;
  padding: 10px;
  display: none;
  z-index: 40;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: .9rem;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: var(--pale);
  text-decoration: none;
}

.breadcrumbs {
  padding: 26px 0 0;
  font-size: .85rem;
  color: var(--muted);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

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

.breadcrumbs li:not(:last-child):after {
  content: '›';
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--blue);
  font-weight: 700;
}

.page-head {
  padding: 18px 0 8px;
  max-width: 860px;
}

.page-head p {
  color: var(--muted);
}

.page-head a, .prose a {
  color: var(--blue);
  font-weight: 700;
}

.page-head a:hover, .prose a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-intro {
  max-width: 820px;
}

.page-intro p {
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 34px 0 84px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.card-body {
  padding: 24px;
}

.card-body h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
}

.card-body h3 a:hover {
  color: var(--blue);
}

.card-body p {
  font-size: .93rem;
  color: var(--muted);
  margin: 0;
}

.article-head {
  padding-top: 18px;
  max-width: 920px;
}

.article-lede {
  font-size: 1.16rem;
  color: var(--muted);
  max-width: 760px;
}

.meta-line {
  font-size: .85rem;
  color: var(--muted);
  margin: 18px 0 26px;
}

.article-figure {
  margin: 0 0 10px;
}

.article-figure img {
  border-radius: var(--radius);
  width: 100%;
}

.article-figure figcaption {
  font-size: .82rem;
  color: var(--muted);
  margin-top: 10px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 52px;
  align-items: start;
  padding-bottom: 10px;
}

.prose {
  min-width: 0;
}

.prose > p:first-child {
  font-size: 1.06rem;
}

.article-section {
  margin: 0 0 38px;
}

.article-section h2 {
  font-size: 1.65rem;
  margin-bottom: 16px;
}

.article-section h3 {
  margin-top: 26px;
}

.prose p {
  margin: 0 0 18px;
}

.prose ul, .prose ol {
  margin: 0 0 18px;
  padding-left: 26px;
}

.prose li {
  margin-bottom: 9px;
}

.prose li::marker {
  color: var(--blue);
  font-weight: 700;
}

.callout {
  background: var(--pale);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 0 0 20px;
}

.callout p {
  margin: 0;
}

.callout strong {
  color: var(--ink);
}

.toc {
  position: sticky;
  top: 110px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  background: #fff;
}

.toc-title {
  font-size: .8rem;
  letter-spacing: .12em;
  margin: 0 0 14px;
  color: var(--ink);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .9rem;
}

.toc-list li {
  margin-bottom: 10px;
}

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

.toc-list a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.toc-mobile {
  display: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 6px 22px;
}

.toc-mobile summary {
  font-weight: 700;
  cursor: pointer;
  padding: 14px 0;
  list-style: none;
}

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

.toc-mobile .toc-list {
  padding-bottom: 16px;
}

.related {
  margin: 26px 0 84px;
}

.related .cards {
  margin: 26px 0 0;
}

.prose-page {
  max-width: 860px;
  padding-bottom: 84px;
}

.prose-page h2 {
  font-size: 1.55rem;
  margin: 34px 0 14px;
}

.prose-page h2:first-child {
  margin-top: 10px;
}

.policy-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid #27344a;
  font-size: .85rem;
}

.policy-strip a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-bottom small a {
  font-weight: 700;
}

.footer-bottom small a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media(max-width:1050px) {
  .dropdown {
    width: 100%;
  }

  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 15px;
    min-height: 48px;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    min-width: 0;
    padding: 0 0 8px 14px;
  }

  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu {
    display: none;
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown-menu a {
    padding: 12px 15px;
    white-space: normal;
  }

  .article-layout {
    display: flex;
    flex-direction: column;
    gap: 26px;
  }

  .toc-wrap {
    order: -1;
    width: 100%;
  }

  .toc {
    display: none;
  }

  .toc-mobile {
    display: block;
  }

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

@media(max-width:760px) {
  .cards {
    grid-template-columns: 1fr;
    margin-bottom: 60px;
  }

  .article-section h2 {
    font-size: 1.45rem;
  }

  .related {
    margin-bottom: 60px;
  }
}
