/* AI Training Plan — Kraken-inspired design system, implemented per DESIGN.md.
   One shared stylesheet. Self-hosted fonts under assets/fonts/ (no network fonts). */

/* IBM Plex Sans, variable weight file (covers 400–700). License: assets/fonts/OFL.txt */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/IBMPlexSans-var.woff2") format("woff2");
}

:root {
  --purple: #7132f5;
  --purple-dark: #5741d8;
  --purple-deep: #5b1ecf;
  --purple-subtle: rgba(133, 91, 251, 0.16);
  --ink: #101114;
  --cool-gray: #686b82;
  --gray-border: rgba(104, 107, 130, 0.24);
  --silver: #9497a9;
  --divider: #dedee5;
  --white: #ffffff;
  --gray-bg: rgba(148, 151, 169, 0.08);
  --neutral-badge-bg: rgba(104, 107, 130, 0.12);
  --neutral-badge-ink: #484b5e;
  --green: #149e61;
  --green-bg: rgba(20, 158, 97, 0.16);
  --green-dark: #026b3f;
  --font-display: "Kraken-Brand", "IBM Plex Sans", Helvetica, Arial, sans-serif;
  --font-body: "Kraken-Product", "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --shadow-subtle: rgba(0, 0, 0, 0.03) 0px 4px 24px;
  --shadow-micro: rgba(16, 24, 40, 0.04) 0px 1px 4px;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.38;
}

.container { max-width: 1152px; margin: 0 auto; padding: 0 20px; }

main { display: block; padding-bottom: 48px; }
section { margin-top: 48px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--purple); color: var(--white);
  padding: 8px 12px; border-radius: 0 0 8px 0; z-index: 50;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }

/* Type scale (DESIGN.md hierarchy) */
h1 {
  font-family: var(--font-display); font-size: 36px; font-weight: 700;
  line-height: 1.22; letter-spacing: -0.5px; margin: 0 0 16px;
}
h2 {
  font-family: var(--font-display); font-size: 28px; font-weight: 700;
  line-height: 1.29; letter-spacing: -0.5px; margin: 24px 0 12px;
}
h3 { font-family: var(--font-body); font-size: 22px; font-weight: 600; line-height: 1.20; margin: 20px 0 10px; }
h4 { font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.38; margin: 16px 0 8px; }
.t-hero { font-size: 48px; line-height: 1.17; letter-spacing: -1px; }

p { margin: 0 0 12px; }
strong { font-weight: 600; }
.lede { font-weight: 500; color: var(--cool-gray); }
.caption { font-size: 14px; line-height: 1.43; color: var(--cool-gray); }
.small { font-size: 12px; line-height: 1.33; color: var(--silver); }
.micro {
  font-size: 7px; font-weight: 500; line-height: 1.0;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--purple); margin: 0;
}
.eyebrow {
  font-size: 12px; font-weight: 600; line-height: 1.33;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--purple); margin: 0 0 8px;
}

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-dark); text-decoration: underline; }

ul, ol { margin: 0 0 12px; padding-left: 24px; }
li { margin-bottom: 6px; }
li > ul, li > ol { margin-top: 6px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--white); border-bottom: 1px solid var(--divider);
  box-shadow: var(--shadow-micro);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover, .brand:hover .brand-name { color: var(--purple); text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--purple); color: var(--white);
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.brand-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.brand-logo { height: 28px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex; padding: 8px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; line-height: 1.43; color: var(--cool-gray);
}
.site-nav a:hover { color: var(--ink); background: var(--gray-bg); text-decoration: none; }
.site-nav a.active { color: var(--purple); background: var(--purple-subtle); }

/* Nav dropdown (Resources) — opens on hover/focus via CSS, on click via .open */
.nav-dropdown { position: relative; display: inline-flex; }
.nav-drop-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.43; color: var(--cool-gray);
}
.nav-drop-toggle:hover { color: var(--ink); background: var(--gray-bg); }
.nav-dropdown.is-active > .nav-drop-toggle { color: var(--purple); background: var(--purple-subtle); }
.nav-caret { transition: transform 0.15s ease; }
.nav-dropdown.open .nav-caret { transform: rotate(180deg); }
.nav-drop-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  display: flex; flex-direction: column; gap: 2px; min-width: 180px; padding: 6px;
  background: var(--white); border: 1px solid var(--divider); border-radius: 12px;
  box-shadow: var(--shadow-subtle);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
}
.nav-dropdown.open > .nav-drop-menu { opacity: 1; visibility: visible; transform: none; }

/* Nav user box (far right): Google avatar + sign-out menu. Sized to match the
   neighbouring nav links (14px text, 8px×12px padding, 8px radius; avatar 24px). */
.nav-user { position: relative; display: inline-flex; margin-left: 8px; }
.nav-user-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 0; border-radius: 8px; background: none; cursor: pointer; font-family: inherit;
}
.nav-user-toggle:hover { background: var(--gray-bg); }
.nav-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--purple-subtle); color: var(--purple-deep);
  font-size: 11px; font-weight: 600;
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-user-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.nav-user-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30;
  display: flex; flex-direction: column; gap: 10px; min-width: 220px; padding: 12px;
  background: var(--white); border: 1px solid var(--divider); border-radius: 12px;
  box-shadow: var(--shadow-subtle);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
}
.nav-user.open > .nav-user-menu { opacity: 1; visibility: visible; transform: none; }
.nav-user-email { margin: 0; font-size: 13px; color: var(--cool-gray); overflow-wrap: anywhere; }
.nav-signout {
  padding: 8px 12px; border: 1px solid var(--gray-border); border-radius: 10px;
  background: var(--white); color: var(--ink); cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600;
}
.nav-signout:hover { background: var(--gray-bg); }

/* Hero */
.hero { padding: 48px 0 0; }
.hero .t-hero { max-width: 800px; }
.hero .caption { max-width: 720px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 16px; }

/* Page header (inner pages) */
.page-header { padding-top: 24px; }
.page-header .lede { max-width: 860px; }

/* Buttons (DESIGN.md: 12px radius, never pill) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.38;
  padding: 13px 16px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--purple); color: var(--white); }
.btn-primary:hover { background: var(--purple-dark); color: var(--white); }
.btn-outline { background: var(--white); color: var(--purple-dark); border-color: var(--purple-dark); }
.btn-outline:hover { background: var(--purple-subtle); color: var(--purple-deep); }
.btn-subtle { background: var(--purple-subtle); color: var(--purple); padding: 8px 12px; }
.btn-subtle:hover { color: var(--purple-deep); }
.btn-white { background: var(--white); color: var(--ink); border-radius: 10px; border-color: var(--gray-border); box-shadow: var(--shadow-subtle); }
.btn-white:hover { color: var(--ink); background: var(--gray-bg); }
.btn-gray { background: var(--gray-bg); color: var(--ink); }
.btn-gray:hover { color: var(--ink); background: var(--neutral-badge-bg); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500; line-height: 1.33;
  padding: 3px 8px; border-radius: 8px;
}
.badge-success { background: var(--green-bg); color: var(--green-dark); border-radius: 6px; }
.badge-neutral { background: var(--neutral-badge-bg); color: var(--neutral-badge-ink); }
.badge-purple { background: var(--purple-subtle); color: var(--purple); }
.badge-solid { background: var(--purple); color: var(--white); border-radius: 6px; }
.badge-solid-green { background: var(--green); color: var(--white); border-radius: 6px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }

/* Cards, grids, callouts */
.card {
  background: var(--white); border: 1px solid var(--gray-border);
  border-radius: 16px; padding: 20px; box-shadow: var(--shadow-micro);
}
.card > :first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; margin-top: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.callout { border-radius: 12px; padding: 16px 20px; margin: 16px 0; }
.callout > :last-child { margin-bottom: 0; }
.callout-exercise { background: var(--purple-subtle); }
.callout-checkpoint { background: var(--green-bg); }
.callout-neutral { background: var(--gray-bg); }
.callout-title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 10px; font-size: 16px; font-weight: 600; line-height: 1.38;
}
.skill-bar { margin: 10px 0 12px; }

/* Tables */
.table-wrap {
  overflow-x: auto; margin: 16px 0;
  border: 1px solid var(--gray-border); border-radius: 12px;
  box-shadow: var(--shadow-micro); background: var(--white);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.43; }
thead th {
  text-align: left; font-size: 12px; font-weight: 600; line-height: 1.33;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--cool-gray);
  background: var(--gray-bg); padding: 10px 16px; border-bottom: 1px solid var(--divider);
}
tbody th, tbody td { padding: 12px 16px; border-bottom: 1px solid var(--divider); vertical-align: top; text-align: left; }
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }

/* Code */
code {
  font-family: var(--font-mono); font-size: 0.875em;
  background: var(--neutral-badge-bg); border-radius: 6px; padding: 1px 5px;
}
pre {
  background: var(--gray-bg); border: 1px solid var(--divider); border-radius: 12px;
  padding: 16px 20px; overflow-x: auto; margin: 16px 0;
}
pre code { background: none; padding: 0; font-size: 14px; line-height: 1.5; }

/* Schedule page */
.week-section { margin-top: 48px; }
.week-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.week-head h2 { margin: 0; }
.week-sub { margin: 8px 0 0; }
.day-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px; margin-top: 16px;
}
a.day-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: var(--ink); }
a.day-card:hover { color: var(--ink); border-color: var(--purple); box-shadow: var(--shadow-subtle); text-decoration: none; }
.day-card-title { font-weight: 600; font-size: 16px; line-height: 1.38; }
a.day-card .badge-row { margin: 0; }
.done-flag { display: none; color: var(--green-dark); font-weight: 500; font-size: 12px; line-height: 1.33; }
.day-card.is-done { border-color: var(--green); }
.day-card.is-done .done-flag { display: inline-flex; }

/* Day pages */
.breadcrumb {
  display: flex; gap: 8px; align-items: center;
  margin: 20px 0 12px; color: var(--silver); font-size: 12px; line-height: 1.33;
}
.breadcrumb a { color: var(--cool-gray); }
.day-header { padding-top: 0; }
.track-block { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--divider); }
.track-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.track-head h2 { margin: 0; }
.track-sub { margin: 0; }
.day-links { margin-top: 24px; }
.day-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.day-nav a { display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.day-nav a:hover { color: var(--ink); border-color: var(--purple); box-shadow: var(--shadow-subtle); text-decoration: none; }
.day-next { align-items: flex-end; text-align: right; }
.day-nav-title { font-weight: 600; font-size: 14px; line-height: 1.43; }
.day-complete {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 24px; cursor: pointer; user-select: none;
}
.day-complete input { width: 20px; height: 20px; margin: 0; accent-color: var(--purple); cursor: pointer; }
.day-complete .day-complete-label { font-weight: 500; }
.day-complete input:checked ~ .day-complete-label { color: var(--green-dark); }

/* Skill setup disclosures (day pages, "Skills today") */
.skill-setup { margin-top: 6px; font-size: 14px; line-height: 1.5; }
.skill-setup summary {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; user-select: none;
  font-size: 13px; font-weight: 500; color: var(--purple-dark);
  background: var(--gray-bg); border: 1px solid var(--gray-border);
  border-radius: 8px; padding: 2px 10px; list-style: none;
}
.skill-setup summary::-webkit-details-marker { display: none; }
.skill-setup summary::before { content: "▸"; color: var(--purple); font-size: 11px; }
.skill-setup[open] summary::before { content: "▾"; }
.skill-setup[open] summary { margin-bottom: 8px; }
.skill-setup > p, .skill-setup > ol { margin: 6px 0 0; color: var(--cool-gray); }
.skill-setup > p + p { margin-top: 6px; }
.skill-setup ol { padding-left: 20px; }
.skill-setup li { margin: 4px 0; color: var(--cool-gray); }
.skill-setup code { font-size: 13px; }

/* Footer */
.site-footer { border-top: 1px solid var(--divider); background: var(--white); padding: 24px 0; margin-top: 48px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.footer-note { margin: 0; max-width: 620px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a { color: var(--cool-gray); font-size: 12px; line-height: 1.33; }
.footer-nav a:hover { color: var(--purple); }

/* Responsive (DESIGN.md breakpoints) */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .t-hero { font-size: 36px; letter-spacing: -0.5px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  h3 { font-size: 16px; line-height: 1.38; }
  section { margin-top: 24px; }
  .hero { padding: 24px 0 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .day-nav { grid-template-columns: 1fr; }
  .day-next { align-items: flex-start; text-align: left; }
}
@media (max-width: 425px) {
  .t-hero { font-size: 28px; }
  .container { padding: 0 16px; }
}
@media (max-width: 375px) {
  .btn-row { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
