/*
 * Nettik web — a single stylesheet. No build step.
 *
 * Token sources (same values as mobile; update both together):
 *   colors           packages/design_system/lib/src/tokens/colors.dart
 *   subject colors   packages/design_system/lib/src/tokens/subject_colors.dart
 *   type scale       packages/design_system/lib/src/tokens/typography.dart
 *   spacing, radius  packages/design_system/lib/src/tokens/spacing.dart
 *   shadows          packages/design_system/lib/src/tokens/shadows.dart
 *   motion           packages/design_system/lib/src/tokens/motion.dart
 *   size classes     packages/design_system/lib/src/layout/window_size_class.dart (600 / 840 / 1200)
 *
 * Text in rem (grows when the user enlarges text, no overflow up to 200%); spacing,
 * radius, icons and touch targets in px. Same as mobile: Flutter only scales text too.
 */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Regular.401a43071b97.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Medium.4f44d2a3a7ed.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-SemiBold.3b6259b8d867.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Bold.2005d5fa610c.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-ExtraBold.8962185501ca.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  /* Brand */
  --primary: #0a7f5c;
  --primary-dark: #075e44;
  --primary-soft: #e2f5ec;
  --on-primary-muted: #cdebdd;
  --primary-accent: #6cc3a0;
  /* Correct / wrong (never shown by colour alone) */
  --correct: #2459d6;
  --correct-dark: #1d47ae;
  --correct-soft: #e3ecff;
  --wrong: #c9541c;
  --wrong-dark: #a84a0c;
  --wrong-soft: #ffe9dc;
  --warning: #c99a1e;
  --warning-soft: #fff1c7;
  /* Surfaces */
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-muted: #f0f1f6;
  --border: #e3e6f0;
  --border-strong: #dde0ea;
  /* Text */
  --ink: #1b1d2a;
  --ink-secondary: #5f6378;
  --ink-muted: #6b6f85;
  --ink-disabled: #b8bbcc;
  --white: #ffffff;
  /* Subject colours: background / text */
  --subject-turkce-bg: #ffe4d6;
  --subject-turkce-fg: #8a3b12;
  --subject-matematik-bg: #dcebff;
  --subject-matematik-fg: #1d4e9e;
  --subject-tarih-bg: #fff1c7;
  --subject-tarih-fg: #7a5600;
  --subject-cografya-bg: #d4f1f7;
  --subject-cografya-fg: #0e5f70;
  --subject-vatandaslik-bg: #ece3ff;
  --subject-vatandaslik-fg: #5b3bb0;
  --subject-guncel-bg: #ffe0ea;
  --subject-guncel-fg: #9c2a55;

  /* Type scale (16 px = 1rem) */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-display: 2.5rem; /* 40 / 800 */
  --fs-headline: 1.375rem; /* 22 / 800 */
  --fs-title: 1.1875rem; /* 19 / 800 */
  --fs-question: 1.125rem; /* 18 / 600 */
  --fs-title-small: 1rem; /* 16 / 700 */
  --fs-body-large: 1rem; /* 16 / 500 */
  --fs-body: 0.9375rem; /* 15 / 500 */
  --fs-body-small: 0.875rem; /* 14 / 500 */
  --fs-label: 0.8125rem; /* 13 / 600 */
  --fs-caption: 0.75rem; /* 12 / 600 */

  /* Spacing */
  --sp-xxs: 4px;
  --sp-xs: 6px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 20px;
  --sp-xxl: 24px;
  --sp-xxxl: 32px;
  --sp-section: 18px;
  --screen-compact: 20px;
  --screen-wide: 32px;
  /* Touch target is a physical size: stays 48 px when text grows, so the menu never overflows. */
  --touch: 48px;
  --max-content: 1200px; /* 1200 */

  /* Radius */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-xxl: 28px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-card: 0 2px 10px rgba(27, 29, 42, 0.04);
  --shadow-raised: 0 6px 20px rgba(27, 29, 42, 0.08);
  --shadow-floating: 0 10px 30px rgba(27, 29, 42, 0.12);

  /* Motion */
  --t-fast: 150ms;
  --t-medium: 250ms;
  --t-slow: 400ms;
  --ease: cubic-bezier(0.215, 0.61, 0.355, 1); /* easeOutCubic */

  /* Floating bottom bar (compact) */
  --bar-height: 68px; /* 68 */
  --bar-margin: 16px;
  --bar-bottom: 18px;

  color-scheme: light;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: currentColor;
}

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

.skip-link {
  position: absolute;
  left: var(--sp-lg);
  top: -10rem;
  z-index: 100;
  padding: var(--sp-md) var(--sp-lg);
  background: var(--surface);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-raised);
}
.skip-link:focus {
  top: var(--sp-lg);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
}

/* ---------- Typography ---------- */

.t-display {
  font-size: var(--fs-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.t-headline {
  font-size: var(--fs-headline);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.t-title {
  font-size: var(--fs-title);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.t-title-small {
  font-size: var(--fs-title-small);
  font-weight: 700;
  line-height: 1.3;
}
.t-body-large {
  font-size: var(--fs-body-large);
}
.t-body-small {
  font-size: var(--fs-body-small);
  line-height: 1.4;
}
.t-label {
  font-size: var(--fs-label);
  font-weight: 600;
}
.t-caption {
  font-size: var(--fs-caption);
  font-weight: 600;
}
.muted {
  color: var(--ink-secondary);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  min-height: var(--touch);
  padding: var(--sp-md) var(--sp-xxl);
  border: 0;
  border-radius: var(--r-pill);
  font: inherit;
  font-size: var(--fs-title-small);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-dark);
}
.btn-secondary {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.btn-secondary:hover {
  background: #d3efe2;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--surface-muted);
}
.btn-danger {
  background: var(--wrong-soft);
  color: var(--wrong-dark);
}
.btn-danger:hover {
  background: #ffdcc7;
}
.btn-block {
  width: 100%;
}
.btn[disabled],
.btn[aria-disabled="true"] {
  background: var(--surface-muted);
  color: var(--ink-disabled);
  cursor: not-allowed;
}
.btn .htmx-indicator {
  display: none;
}
.htmx-request .btn .htmx-indicator,
.btn.htmx-request .htmx-indicator {
  display: inline-block;
}
.spinner {
  width: 1.1em;
  height: 1.1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.link-button {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0 var(--sp-xs);
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.link-button:hover {
  text-decoration: underline;
}
.link-button[disabled] {
  color: var(--ink-disabled);
  cursor: not-allowed;
  text-decoration: none;
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border-radius: var(--r-xxl);
  box-shadow: var(--shadow-card);
  padding: var(--sp-xl);
}
.card > * + * {
  margin-top: var(--sp-lg);
}

.hero-card {
  position: relative;
  overflow: hidden;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--r-xxl);
  padding: var(--sp-xl) var(--sp-xl) var(--sp-xxl);
}
.hero-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}
.hero-card > * {
  position: relative;
}
.hero-card .overline {
  color: var(--on-primary-muted);
  font-size: var(--fs-label);
  font-weight: 600;
}
.hero-card .t-headline {
  margin-top: var(--sp-xs);
  font-size: 1.75rem;
}
.hero-card p {
  margin-top: var(--sp-sm);
  color: var(--white);
  font-size: var(--fs-label);
  font-weight: 600;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-lg) 0;
  text-align: center;
}
.empty-state .badge-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--sp-sm);
  border-radius: var(--r-lg);
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.empty-state .badge-icon .icon {
  width: 28px;
  height: 28px;
}
.empty-state p {
  max-width: 32rem;
  color: var(--ink-secondary);
}
.empty-state .t-title-small {
  color: var(--ink);
}

/* ---------- Forms ---------- */

.form-stack > * + * {
  margin-top: var(--sp-lg);
}
.field label {
  display: block;
  margin-bottom: var(--sp-xs);
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--ink-secondary);
}
.input-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  min-height: 56px;
  padding: 0 var(--sp-lg);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--ink-muted);
  transition: border-color var(--t-fast) var(--ease);
}
.input-wrap:focus-within {
  border-color: var(--primary);
}
.input-wrap.has-error {
  border-color: var(--wrong);
}
.input-wrap input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-body-large);
}
.input-wrap input::placeholder {
  color: var(--ink-muted);
}
.input-wrap .toggle-password {
  display: grid;
  place-items: center;
  width: var(--touch);
  height: var(--touch);
  margin-right: calc(-1 * var(--sp-md));
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}
.input-wrap .toggle-password:hover {
  background: var(--surface-muted);
}
.input-wrap .toggle-password .icon-hide,
.input-wrap .toggle-password[aria-pressed="true"] .icon-show {
  display: none;
}
.input-wrap .toggle-password[aria-pressed="true"] .icon-hide {
  display: block;
}
.code-input input {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.4em;
  text-align: center;
}

.field-error,
.form-error {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-xs);
  margin-top: var(--sp-xs);
  color: var(--wrong-dark);
  font-size: var(--fs-label);
  font-weight: 600;
}
.form-error {
  margin: 0;
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--r-md);
  background: var(--wrong-soft);
}
.field-error .icon,
.form-error .icon {
  width: 18px;
  height: 18px;
  margin-top: 0.1em;
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--r-md);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: var(--fs-label);
  font-weight: 600;
}
.notice .icon {
  width: 18px;
  height: 18px;
  margin-top: 0.1em;
}

.rules {
  margin: var(--sp-sm) 0 0;
  padding: 0;
  list-style: none;
}
.rules li {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  min-height: 28px;
  color: var(--ink-muted);
  font-size: var(--fs-label);
}
.rules .icon {
  width: 18px;
  height: 18px;
}
.rules .icon-met,
.rules li.met .icon-unmet {
  display: none;
}
.rules li.met {
  color: var(--primary-dark);
}
.rules li.met .icon-met {
  display: block;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  min-height: var(--touch);
  padding: var(--sp-xs) 0;
  cursor: pointer;
  font-size: var(--fs-body-small);
  color: var(--ink);
}
.checkbox input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ---------- Auth pages ---------- */

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--sp-xxxl) var(--screen-compact);
}
.auth-back {
  position: fixed;
  left: var(--sp-sm);
  top: var(--sp-sm);
  display: grid;
  place-items: center;
  width: var(--touch);
  height: var(--touch);
  border-radius: 50%;
  color: var(--ink);
}
.auth-back:hover {
  background: var(--surface-muted);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: var(--sp-xxl) var(--sp-xl);
  background: var(--surface);
  border-radius: var(--r-xxl);
  box-shadow: var(--shadow-card);
}
.auth-card .logo {
  height: 36px;
  width: auto;
  margin: 0 auto var(--sp-lg);
}
.auth-card header {
  margin-bottom: var(--sp-xxl);
  text-align: center;
}
.auth-card header p {
  margin-top: var(--sp-sm);
  color: var(--ink-secondary);
}
.auth-card .switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 var(--sp-xs);
  margin-top: var(--sp-lg);
  font-size: var(--fs-body-small);
}
.auth-card .row-end {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--sp-xs);
}

/* ---------- App shell ---------- */

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
}
.app-main {
  padding: var(--sp-xxl) var(--screen-compact) calc(var(--bar-height) + var(--bar-bottom) + var(--sp-xxxl));
}
.app-content {
  max-width: var(--max-content);
  margin: 0 auto;
}

.nav {
  z-index: 10;
}
.nav-brand {
  display: none;
}
.nav-list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  min-width: var(--touch);
  min-height: var(--touch);
  color: var(--ink-muted);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--r-pill);
  transition:
    background-color var(--t-medium) var(--ease),
    color var(--t-medium) var(--ease);
}
.nav-item:hover {
  text-decoration: none;
  color: var(--ink);
}
.nav-item[aria-current="page"] {
  color: var(--primary-dark);
}
.nav-item .icon-on,
.nav-item[aria-current="page"] .icon-off {
  display: none;
}
.nav-item[aria-current="page"] .icon-on {
  display: block;
}
.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: min(0.875rem, 18px);
}
.nav .icon {
  width: 22px;
  height: 22px;
}

/* compact (< 600): floating bottom bar; selected tab shows icon + label */
@media (max-width: 599.98px) {
  .nav {
    position: fixed;
    left: var(--bar-margin);
    right: var(--bar-margin);
    bottom: calc(var(--bar-bottom) + env(safe-area-inset-bottom, 0px));
    min-height: var(--bar-height);
    padding: 8px;
    background: var(--surface);
    border-radius: calc(var(--bar-height) / 2);
    box-shadow: var(--shadow-floating);
  }
  .nav-list {
    align-items: center;
    height: 100%;
    min-height: calc(var(--bar-height) - 2 * var(--sp-sm));
  }
  .nav-list li {
    flex: 1 1 0;
    min-width: var(--touch);
    display: flex;
    justify-content: center;
  }
  .nav-list li:has([aria-current="page"]) {
    flex: 0 1 auto;
  }
  .nav-item[aria-current="page"] {
    padding: 0 16px;
    background: var(--primary-soft);
    min-width: 0;
    max-width: 100%;
  }
  .nav-item:not([aria-current="page"]) .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}

/* medium and up: rail on the left */
@media (min-width: 600px) {
  .app-shell {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
  }
  .nav {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    padding: var(--sp-xxl) var(--sp-sm);
    background: var(--surface);
    border-right: 1px solid var(--border);
  }
  .nav-brand {
    display: flex;
    justify-content: center;
    margin-bottom: var(--sp-xxxl);
  }
  .nav-brand .brand-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
  }
  .nav-brand .brand-logo {
    display: none;
  }
  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: var(--sp-sm);
  }
  .nav-list li {
    display: flex;
    justify-content: center;
    width: 100%;
  }
  .nav-item {
    min-height: var(--touch);
    height: auto;
    width: 56px;
    border-radius: var(--r-lg);
  }
  .nav-item[aria-current="page"] {
    background: var(--primary-soft);
  }
  .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .app-main {
    padding: var(--sp-xxxl) var(--screen-wide);
  }
}

/* expanded (840–1199): rail + labels */
@media (min-width: 840px) {
  .app-shell {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .nav-item {
    flex-direction: column;
    gap: var(--sp-xxs);
    width: 80px;
    padding: var(--sp-xs) 0;
    background: transparent;
  }
  .nav-item[aria-current="page"] {
    background: transparent;
  }
  .nav-item .icon {
    box-sizing: content-box;
    padding: var(--sp-xxs) var(--sp-lg);
    border-radius: var(--r-pill);
    transition: background-color var(--t-medium) var(--ease);
  }
  .nav-item[aria-current="page"] .icon {
    background: var(--primary-soft);
  }
  .nav-label {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
    max-width: 100%;
    font-size: min(0.75rem, 16px);
    font-weight: 600;
  }
}

/* large (>= 1200): permanent left drawer, logo + labels */
@media (min-width: 1200px) {
  .app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .nav {
    padding: var(--sp-xxxl) var(--sp-xl);
  }
  .nav-brand {
    justify-content: flex-start;
    padding: 0 var(--sp-md);
  }
  .nav-brand .brand-icon {
    display: none;
  }
  .nav-brand .brand-logo {
    display: block;
    height: 36px;
    width: auto;
  }
  .nav-list {
    align-items: stretch;
    gap: var(--sp-xs);
  }
  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--sp-lg);
    width: 100%;
    padding: var(--sp-sm) var(--sp-lg);
    border-radius: var(--r-md);
  }
  .nav-item .icon {
    padding: 0;
    background: transparent;
  }
  .nav-item[aria-current="page"] {
    background: var(--primary-soft);
  }
  .nav-item[aria-current="page"] .icon {
    background: transparent;
  }
  .nav-label {
    font-size: min(1rem, 21px);
    font-weight: 600;
  }
  .nav-item[aria-current="page"] .nav-label {
    font-weight: 700;
  }
}

/* ---------- Page content ---------- */

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-section);
}
.page-header .brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
}
@media (min-width: 600px) {
  .page-header .brand-icon {
    display: none;
  }
}
.page-header .date {
  color: var(--ink-secondary);
  font-size: var(--fs-label);
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-section);
  align-items: start;
}
@media (min-width: 840px) {
  .today-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: var(--sp-xxl);
  }
}

.stack > * + * {
  margin-top: var(--sp-section);
}
.profile-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-sm) var(--sp-lg);
}
.profile-row dt {
  color: var(--ink-secondary);
  font-size: var(--fs-label);
  font-weight: 600;
}
.profile-row dd {
  min-width: 0;
  margin: 0;
  font-weight: 600;
  /* Email addresses have no spaces; break anywhere if needed. */
  overflow-wrap: anywhere;
}
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-section);
  align-items: start;
}
@media (min-width: 840px) {
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sp-md);
}
.inline-form .field {
  flex: 1 1 224px;
  min-width: 0;
}

/* ---------- Landing page ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  max-width: var(--max-content);
  margin: 0 auto;
  padding: var(--sp-lg) var(--screen-compact);
}
.site-header .logo {
  height: 32px;
  width: auto;
}
.site-header .btn {
  padding: var(--sp-sm) var(--sp-xl);
}
.landing {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--screen-compact) var(--sp-xxxl);
}
.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-xxl);
  align-items: center;
  padding: var(--sp-xxxl) 0;
}
.landing-hero h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.landing-hero h1 em {
  color: var(--primary);
  font-style: normal;
}
.landing-hero .lead {
  margin-top: var(--sp-lg);
  max-width: 36rem;
  color: var(--ink-secondary);
  font-size: 1.0625rem;
}
.landing-hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
  margin-top: var(--sp-xxl);
}
.exam-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin: var(--sp-xxl) 0 0;
  padding: 0;
  list-style: none;
}
.exam-tags li {
  padding: var(--sp-xs) var(--sp-md);
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  font-size: var(--fs-label);
  font-weight: 700;
}
.hero-visual {
  display: grid;
  gap: var(--sp-md);
}
.hero-visual .hero-card .t-display {
  margin-top: var(--sp-xs);
}
.option-demo {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  min-height: 56px;
  padding: var(--sp-sm) var(--sp-lg);
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-weight: 600;
}
.option-demo .letter {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-muted);
  font-weight: 800;
  font-size: var(--fs-label);
}
.option-demo .icon {
  margin-left: auto;
}
.option-demo.correct {
  border-color: var(--correct);
  background: var(--correct-soft);
  color: var(--correct-dark);
}
.option-demo.correct .letter {
  background: var(--correct);
  color: var(--white);
}
.option-demo.wrong {
  border-color: var(--wrong);
  background: var(--wrong-soft);
  color: var(--wrong-dark);
}
.option-demo.wrong .letter {
  background: var(--wrong);
  color: var(--white);
}
@media (min-width: 840px) {
  .landing-hero {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--sp-xxxl);
    padding: 64px 0;
  }
  .site-header,
  .landing {
    padding-left: var(--screen-wide);
    padding-right: var(--screen-wide);
  }
}
.section-title {
  margin-bottom: var(--sp-xl);
}
.features {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .features {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.feature {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.card.feature > * + * {
  margin-top: 0;
}
.feature .badge {
  margin-bottom: var(--sp-xs);
}
.feature .badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
}
.feature p {
  color: var(--ink-secondary);
  font-size: var(--fs-body-small);
}
.badge-turkce {
  background: var(--subject-turkce-bg);
  color: var(--subject-turkce-fg);
}
.badge-matematik {
  background: var(--subject-matematik-bg);
  color: var(--subject-matematik-fg);
}
.badge-cografya {
  background: var(--subject-cografya-bg);
  color: var(--subject-cografya-fg);
}
.badge-vatandaslik {
  background: var(--subject-vatandaslik-bg);
  color: var(--subject-vatandaslik-fg);
}
.download {
  margin-top: var(--sp-xxxl);
  text-align: center;
}
.download .card > * + * {
  margin-top: var(--sp-md);
}
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-md);
  margin-top: var(--sp-xl) !important;
}
.store-button {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-md);
  min-height: 56px;
  padding: var(--sp-sm) var(--sp-xl);
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--white);
  text-align: left;
}
.store-button small {
  display: block;
  color: var(--ink-disabled);
  font-size: var(--fs-caption);
  font-weight: 600;
}
.store-button strong {
  display: block;
  font-size: var(--fs-title-small);
}
.site-footer {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: var(--sp-xxl) var(--screen-compact) var(--sp-xxxl);
  color: var(--ink-muted);
  font-size: var(--fs-label);
  text-align: center;
}

/* ---------- Error pages ---------- */

.error-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--sp-xxxl) var(--screen-compact);
  text-align: center;
}
.error-page .card {
  max-width: 480px;
}
.error-page .logo {
  height: 32px;
  width: auto;
  margin: 0 auto;
}
.error-page .code {
  color: var(--primary);
}

/* Page transitions: the public site opts in too; both sides must, or the browser
   aborts the transition with a console error. */
@view-transition {
  navigation: auto;
}
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}
