:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #0a0a0a;
  --card: #ffffff;
  --muted: #4b5563;
  --muted-light: #6b7280;
  --border: #e5e5e5;
  --soft: #f9fafb;
  --blue: #1d4ed8;
  --blue-hover: #2563eb;
  --red: #dc2626;
}

[data-theme="dark"] {
  color-scheme: dark;
  --background: #08090A;
  --foreground: #F7F8F8;
  --card: #111113;
  --muted: #B6BCC8;
  --muted-light: #8B93A1;
  --border: #27272A;
  --soft: #17181C;
  --blue: #1d4ed8;
  --blue-hover: #2563eb;
}

* {
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

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

button {
  color: inherit;
}

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

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 65px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.header-container,
.footer-container {
  width: 100%;
  max-width: 1152px;
  margin-inline: auto;
  padding-inline: 24px;
}

.header-row {
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.desktop-nav {
  grid-column: 2;
}

.desktop-actions,
.about-header-actions {
  grid-column: 3;
  justify-self: end;
}

.brand,
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #111827;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

[data-theme="dark"] .brand,
[data-theme="dark"] .footer-brand {
  color: #f9fafb;
}

.logo-mark {
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #2563eb;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.24);
}

.logo-mark::before {
  content: "2F";
  color: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
}

.logo-mark.small {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}

.logo-mark.small::before {
  font-size: 9px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #4b5563;
}

.desktop-nav a,
.site-footer nav a {
  transition: color 150ms ease;
}

.desktop-nav a:hover,
.site-footer nav a:hover {
  color: var(--blue);
}

.desktop-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.outline-button,
.square-button,
.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.outline-button {
  height: 36px;
  padding-inline: 12px;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.button-icon {
  font-size: 19px;
  line-height: 1;
}

.outline-button:hover,
.square-button:hover {
  background: #f5f5f5;
}

[data-theme="dark"] .outline-button:hover,
[data-theme="dark"] .square-button:hover {
  background: #1f2937;
}

.square-button {
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.mobile-actions,
.mobile-nav {
  display: none;
}

.main-content {
  flex: 1;
}

.main-container {
  width: 100%;
  max-width: 896px;
  margin-inline: auto;
  padding: 16px 24px;
}

.intro {
  padding-top: 16px;
  text-align: center;
  scroll-margin-top: 96px;
}

.intro h1 {
  margin: 0;
  color: #111827;
  font-size: 30px;
  font-weight: 700;
  line-height: 36px;
}

[data-theme="dark"] .intro h1 {
  color: #f9fafb;
}

.intro-lead {
  margin: 8px 0 0;
  color: #4b5563;
  font-size: 18px;
  line-height: 28px;
}

.intro-muted {
  margin: 8px 0 0;
  color: #6b7280;
}

[data-theme="dark"] .intro-lead {
  color: #d1d5db;
}

[data-theme="dark"] .intro-muted {
  color: #9ca3af;
}

.divider {
  width: 100%;
  height: 1px;
  margin-top: 24px;
  background: var(--border);
}

.account-list {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.account-block {
  display: grid;
  gap: 16px;
}

.generator-card,
.timer-card,
.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.generator-card,
.timer-card {
  width: 100%;
  max-width: 448px;
  margin-inline: auto;
}

.generator-card {
  transition: box-shadow 150ms ease;
}

.generator-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.generator-card-content {
  padding: 16px;
}

.field {
  display: block;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
}

[data-theme="dark"] .field {
  color: #d1d5db;
}

.field + .field {
  margin-top: 12px;
}

.field > span:first-child {
  display: block;
  margin-bottom: 8px;
}

.field input {
  display: flex;
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  line-height: 20px;
}

.field input:focus {
  border-color: #a3a3a3;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px #a3a3a3;
}

.secret-wrap {
  position: relative;
  display: block;
}

.secret-wrap input {
  padding-right: 40px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.reveal-button {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  transform: translateY(-50%);
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font-size: 17px;
}

.reveal-button:hover {
  color: #4b5563;
  background: #f5f5f5;
}

.code-box {
  margin-top: 12px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
}

.code-value {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  border: 0;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 36px;
  font-weight: 700;
  line-height: 40px;
  transition: color 150ms ease;
}

[data-theme="dark"] .code-value {
  color: #60a5fa;
}

.code-value:hover {
  color: #1d4ed8;
}

.code-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 9999px;
  background: #171717;
  color: #fafafa;
  font-size: 14px;
  font-weight: 600;
}

[data-theme="dark"] .status-badge {
  background: #fafafa;
  color: #171717;
}

.copy-button {
  width: 42px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--foreground);
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.copy-button svg {
  width: 20px;
  height: 20px;
  display: block;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field-error {
  margin: 8px 0 0;
  color: var(--red);
  font-size: 12px;
}

.field-error:empty {
  display: none;
}

.timer-card-content {
  padding: 24px;
}

.timer-content {
  min-height: 58px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.timer-icon {
  color: #2563eb;
  font-size: 28px;
  line-height: 1;
}

.timer-copy {
  display: grid;
  text-align: center;
}

.timer-copy strong {
  color: #111827;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 24px;
  line-height: 32px;
}

.timer-copy > span {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

[data-theme="dark"] .timer-copy strong {
  color: #f9fafb;
}

.progress-track {
  width: 64px;
  height: 8px;
  overflow: hidden;
  border-radius: 9999px;
  background: #e5e7eb;
}

[data-theme="dark"] .progress-track {
  background: #1f2937;
}

.progress-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: #2563eb;
  transform-origin: left;
  transition: transform 1s linear;
}

.info-card {
  margin-top: 16px;
  scroll-margin-top: 96px;
}

.info-card-content {
  padding: 24px;
}

.info-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
}

.instruction-list {
  color: var(--muted);
  font-size: 14px;
}

.instruction-list p {
  margin: 0;
}

.instruction-list p + p {
  margin-top: 8px;
}

.site-footer {
  margin-top: auto;
  background: var(--card);
  border-top: 1px solid var(--border);
}

.footer-container {
  padding-block: 24px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
}

.footer-row > p {
  order: 2;
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.site-footer nav {
  order: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 16px;
  row-gap: 8px;
  color: #4b5563;
  font-size: 14px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  padding: 10px 14px;
  border-radius: 6px;
  background: #171717;
  color: #fafafa;
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 150ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.active-link {
  color: #2563eb;
  font-weight: 500;
}

.about-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-button {
  background: transparent;
}

.about-page {
  background: #f9fafb;
}

[data-theme="dark"] .about-page {
  background: #111827;
}

.about-main {
  flex: 1;
}

.about-container {
  width: 100%;
  max-width: 896px;
  margin-inline: auto;
  padding: 24px;
}

.about-container > * + * {
  margin-top: 32px;
}

.about-hero {
  padding-top: 32px;
  text-align: center;
}

.about-logo {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 19px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.26), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.about-logo::before {
  font-size: 28px;
}

.about-hero h1 {
  margin: 0;
  color: #111827;
  font-size: 36px;
  font-weight: 700;
  line-height: 40px;
}

.about-hero > p {
  max-width: 672px;
  margin: 16px auto 0;
  color: #4b5563;
  font-size: 20px;
  line-height: 28px;
}

[data-theme="dark"] .about-hero h1 {
  color: #f9fafb;
}

[data-theme="dark"] .about-hero > p {
  color: #d1d5db;
}

.about-divider {
  width: 100%;
  height: 1px;
  margin-top: 32px;
  background: var(--border);
}

.about-section-card,
.feature-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.about-section-card {
  background: var(--card);
}

.about-card-padding {
  padding: 24px;
}

.about-card-padding.large {
  padding: 32px;
}

.about-section-card h2 {
  margin: 0 0 16px;
  color: #111827;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
}

[data-theme="dark"] .about-section-card h2 {
  color: #f3f4f6;
}

.mission-card p {
  margin: 0;
  color: #374151;
  font-size: 18px;
  line-height: 29px;
}

[data-theme="dark"] .mission-card p {
  color: #d1d5db;
}

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

.feature-card.green {
  border-color: #bbf7d0;
  background: #f0fdf4;
  --feature-color: #16a34a;
}

.feature-card.blue {
  border-color: #bfdbfe;
  background: #eff6ff;
  --feature-color: #2563eb;
}

.feature-card.purple {
  border-color: #e9d5ff;
  background: #faf5ff;
  --feature-color: #9333ea;
}

.feature-card.orange {
  border-color: #fed7aa;
  background: #fff7ed;
  --feature-color: #ea580c;
}

[data-theme="dark"] .feature-card.green {
  border-color: #14532d;
  background: rgba(5, 46, 22, 0.5);
}

[data-theme="dark"] .feature-card.blue {
  border-color: #1e3a8a;
  background: rgba(23, 37, 84, 0.5);
}

[data-theme="dark"] .feature-card.purple {
  border-color: #581c87;
  background: rgba(59, 7, 100, 0.5);
}

[data-theme="dark"] .feature-card.orange {
  border-color: #7c2d12;
  background: rgba(67, 20, 7, 0.5);
}

.feature-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.feature-heading h3 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}

[data-theme="dark"] .feature-heading h3 {
  color: #f3f4f6;
}

.feature-icon {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  color: var(--feature-color);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.feature-card p {
  margin: 0 0 16px;
  color: #374151;
}

[data-theme="dark"] .feature-card p {
  color: #d1d5db;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--feature-color) 25%, white);
  border-radius: 9999px;
  color: var(--feature-color);
  font-size: 12px;
  font-weight: 600;
}

.numbered-list,
.faq-list {
  display: grid;
  gap: 24px;
}

.numbered-list > article {
  display: flex;
  gap: 16px;
}

.number {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
}

.numbered-list h4,
.faq-list h4 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
}

.numbered-list p,
.faq-list p {
  margin: 0;
  color: #4b5563;
}

[data-theme="dark"] .numbered-list h4,
[data-theme="dark"] .faq-list h4 {
  color: #f3f4f6;
}

[data-theme="dark"] .numbered-list p,
[data-theme="dark"] .faq-list p {
  color: #9ca3af;
}

.security-card {
  border-color: #fecaca;
  background: #fef2f2;
}

[data-theme="dark"] .security-card {
  border-color: #7f1d1d;
  background: rgba(69, 10, 10, 0.5);
}

.security-list {
  display: grid;
  gap: 16px;
  color: #374151;
}

.security-list p {
  margin: 0;
}

[data-theme="dark"] .security-list {
  color: #d1d5db;
}

@media (max-width: 767px) {
  .desktop-nav,
  .desktop-actions {
    display: none;
  }

  .mobile-actions {
    display: flex;
    grid-column: 3;
    justify-self: end;
    align-items: center;
    gap: 8px;
  }

  .menu-button {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    font-size: 17px;
  }

  .mobile-nav {
    position: absolute;
    top: 64px;
    right: 16px;
    width: 200px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  }

  .mobile-nav.open {
    display: grid;
  }

  .mobile-nav a,
  .mobile-nav button {
    padding: 9px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    text-align: left;
  }

  .mobile-nav a:hover,
  .mobile-nav button:hover {
    background: var(--soft);
  }

  .intro h1 {
    max-width: 330px;
    margin-inline: auto;
  }

  .footer-row {
    flex-direction: column;
  }

  .footer-row > p {
    order: 3;
  }

  .site-footer nav {
    order: 2;
  }

  .about-page .desktop-nav {
    display: none;
  }

  .about-container {
    padding: 24px;
  }

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

@media (max-width: 420px) {
  .header-container {
    padding-inline: 24px;
  }

  .brand {
    font-size: 20px;
  }

  .main-container {
    padding-inline: 24px;
  }

  .intro h1 {
    font-size: 30px;
    line-height: 36px;
  }

  .code-box {
    padding-inline: 16px;
  }

  .about-page .brand {
    font-size: 17px;
    gap: 8px;
  }

  .about-page .brand .logo-mark {
    width: 27px;
    height: 27px;
  }

  .back-button {
    width: 40px;
    padding: 0;
  }

  .back-button span:last-child {
    display: none;
  }

  .about-hero h1 {
    font-size: 34px;
  }

  .about-card-padding.large {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
