/* CodeEasy — an editorial design system for learning and doing. */
:root {
  --bg-primary: #faf9f6;
  --bg-card: #fff;
  --bg-surface: #f1f0ec;
  --text-primary: #202321;
  --text-secondary: #626761;
  --text-muted: #737870;
  --border: #dedfd8;
  --border-light: #eeeee8;
  --accent: #4c4fc5;
  --editorial-accent: #494cc2;
  --accent-light: #efeffb;
  --ce-mint: #ddedb7;
  --ce-radius: 12px;
}
.dark {
  --bg-primary: #131715;
  --bg-card: #1b211e;
  --bg-surface: #242b26;
  --text-primary: #eef1e9;
  --text-secondary: #aeb8af;
  --text-muted: #a3ada4;
  --border: #354039;
  --border-light: #29322c;
  --accent: #babdff;
  --editorial-accent: #b8bbff;
  --accent-light: #2b2e46;
  --ce-mint: #ddedb7;
}
body {
  background: var(--bg-primary) !important;
  color: var(--text-primary);
  font-family: "Outfit", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: #dfe2b8;
  color: #202321;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
summary,
textarea {
  touch-action: manipulation;
}
a,
button {
  -webkit-tap-highlight-color: transparent;
}
:is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
.editorial-shell {
  max-width: 1248px;
  padding-left: 40px;
  padding-right: 40px;
}
.eyebrow {
  font:
    600 10px/1.7 ui-monospace,
    SFMono-Regular,
    monospace;
  letter-spacing: 0.13em;
  color: var(--editorial-accent);
}
.editorial-button,
.tool-primary {
  background: #484bc1 !important;
  border-radius: 7px;
  font-weight: 600;
  gap: 18px;
  min-height: 48px;
  padding: 12px 22px;
  color: #fff !important;
  box-shadow: none;
}
.editorial-button:hover,
.tool-primary:hover {
  background: #35399e !important;
}
.quiet-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-underline-offset: 5px;
}
.quiet-link:hover {
  text-decoration: underline;
}
.section-heading h1,
.section-heading h2 {
  font-size: 34px;
  letter-spacing: -0.035em;
}
.section-heading {
  margin-bottom: 28px;
}
.site-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  z-index: 60;
}
.ce-header {
  height: 76px;
  max-width: 1360px;
  padding: 0 40px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.ce-brand {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -1px;
  color: var(--text-primary);
  white-space: nowrap;
}
.ce-brand-logo {
  display: block;
  width: 216px;
  height: auto;
}
.dark .ce-brand-logo {
  filter: brightness(0) invert(1);
}
.ce-nav {
  display: flex;
  gap: 26px;
  align-items: center;
}
.ce-nav a {
  font-size: 13px;
  min-height: 44px;
  display: flex;
  align-items: center;
  position: relative;
  color: var(--text-secondary);
}
.ce-nav a:hover,
.ce-nav a[aria-current] {
  color: var(--text-primary);
}
.ce-nav a[aria-current]:after {
  content: "";
  height: 3px;
  background: var(--editorial-accent);
  position: absolute;
  bottom: -16px;
  left: 0;
  right: 0;
}
.ce-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ce-icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 7px;
  color: var(--text-secondary);
}
.ce-icon-button:hover {
  background: var(--bg-surface);
}
.ce-start {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-size: 13px;
  padding: 12px 16px;
  border-radius: 6px;
  margin-left: 8px;
  white-space: nowrap;
}
.ce-mobile-nav {
  display: none;
}
.ce-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  padding: 56px 40px 24px;
  background: var(--bg-surface);
}
.ce-footer-grid,
.ce-footer-bottom {
  max-width: 1168px;
  margin: auto;
}
.ce-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr 1.2fr;
  gap: 45px;
}
.ce-footer h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 20px;
}
.ce-footer nav a {
  display: block;
  font-size: 13px;
  line-height: 1.7;
  padding: 5px 0;
  color: var(--text-secondary);
  width: fit-content;
}
.ce-footer nav a:hover {
  color: var(--editorial-accent);
}
.ce-footer-brand p {
  font-size: 23px;
  line-height: 1.35;
  margin: 20px 0 14px;
  letter-spacing: -0.5px;
}
.ce-footer-brand > span,
.ce-footer-newsletter p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.ce-footer-newsletter h2 {
  font-size: 19px;
  margin-bottom: 8px;
}
.ce-footer-newsletter label {
  display: block;
  font-size: 12px;
  margin: 16px 0 7px;
}
.ce-footer-newsletter form > div {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-card);
  padding: 4px;
}
.ce-footer-newsletter input {
  width: 100%;
  min-width: 0;
  background: none;
  border: 0;
  font-size: 14px;
  padding: 8px;
}
.ce-footer-newsletter button {
  background: var(--text-primary);
  color: var(--bg-primary);
  min-width: 44px;
  min-height: 44px;
  border-radius: 4px;
  font-size: 22px;
}
.ce-footer small {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 10px;
}
.ce-footer-bottom {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  margin-top: 48px;
  color: var(--text-secondary);
  font:
    11px ui-monospace,
    monospace;
}
body > button[aria-label="Back to top"] {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: 0 2px 8px #0000000a;
  width: 44px;
  height: 44px;
  bottom: 16px;
  right: 16px;
  z-index: 35;
}
/* Home: an invitation, useful routes, then actual reading. */
.ce-home-hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 72px;
  padding: 72px 0 56px;
  align-items: center;
}
.ce-hero-copy h1 {
  font-size: clamp(46px, 5vw, 70px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.055em;
  margin: 22px 0;
}
.ce-hero-copy h1 em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.055em;
  color: var(--editorial-accent);
}
.ce-hero-copy > p:not(.eyebrow) {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 450px;
}
.ce-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--editorial-accent);
  margin-right: 7px;
}
.ce-hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.ce-hero-footnote {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 28px;
  font-size: 11px;
  color: var(--text-secondary);
}
.ce-hero-footnote span:before {
  content: "✓";
  margin-right: 6px;
  color: var(--editorial-accent);
}
.ce-start-here {
  background: #222c27;
  color: #f4f5ed;
  padding: 30px 30px 20px;
  border-radius: 12px;
  box-shadow: 12px 12px 0 var(--bg-surface);
  position: relative;
}
.ce-start-header {
  display: flex;
  justify-content: space-between;
  color: #d8e6c3;
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 0.12em;
}
.ce-start-header > span:last-child {
  font-size: 24px;
  line-height: 12px;
}
.ce-start-here h2 {
  font-size: 32px;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin: 24px 0;
}
.ce-start-routes > a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 19px 0;
  border-top: 1px solid #ffffff24;
}
.ce-route-number {
  font:
    11px ui-monospace,
    monospace;
  color: #bad49d;
}
.ce-start-routes a > div {
  flex: 1;
}
.ce-start-routes strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
}
.ce-start-routes div > span {
  display: block;
  color: #b4c1b7;
  font-size: 12px;
  margin-top: 5px;
}
.ce-start-routes a > span:last-child {
  color: #d4e5bd;
}
.ce-start-routes a:hover strong {
  color: #ddedb7;
}
.ce-start-here > p {
  font-size: 11px;
  color: #b4c1b7;
  border-top: 1px solid #ffffff24;
  padding-top: 16px;
}
.ce-home-search {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 54px;
}
.ce-home-search label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.ce-home-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}
.ce-home-search button {
  font-size: 13px;
  min-height: 44px;
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--editorial-accent);
}
.ce-section-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}
.discovery-page .spotlight-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: auto;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  overflow: hidden;
}
.discovery-page .spotlight-card {
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  grid-row: auto;
  transform: none;
  min-width: 0;
}
.discovery-page .spotlight-card:last-child {
  border-right: 0;
}
.discovery-page .spotlight-card:hover {
  background: var(--bg-surface);
}
.discovery-page .spotlight-art {
  display: none;
}
.discovery-page .spotlight-copy {
  padding: 28px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.discovery-page .spotlight-copy .card-meta {
  margin-bottom: 26px;
  font:
    10px ui-monospace,
    monospace;
  color: var(--text-secondary);
}
.discovery-page .spotlight-copy .topic-label {
  display: block !important;
  color: var(--editorial-accent);
}
.discovery-page .spotlight-copy h2 {
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 10px 0 14px;
}
.discovery-page .spotlight-lead h2 {
  font-size: 29px;
}
.discovery-page .spotlight-copy p {
  display: block;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.discovery-page .spotlight-copy .read-link {
  display: flex !important;
  margin-top: auto;
  color: var(--editorial-accent);
}
/* Library: readable titles and stable, calm cards. */
.discovery-page .article-library {
  margin-top: 64px;
}
.discovery-page .reading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.discovery-page .reading-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 10px;
  transform: none;
  overflow: hidden;
}
.discovery-page .reading-card-art {
  display: none;
}
.discovery-page .reading-card-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
}
.discovery-page .reading-card h3 {
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  margin: 18px 0 12px;
  max-width: none;
}
.discovery-page .reading-card-body > p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 24px;
  color: var(--text-secondary);
}
.discovery-page .reading-card-footer {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.discovery-page .reading-card-footer time {
  display: block;
}
.discovery-page .reading-card .card-meta {
  font-size: 11px;
}
.reading-card:hover {
  border-color: var(--accent) !important;
}
.topic-filters {
  gap: 6px;
}
.topic-filters a {
  border-radius: 5px;
  background: transparent;
  font-size: 12px;
  padding: 11px 14px;
}
.topic-filters a[aria-current] {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-primary);
}
.library-search {
  border-radius: 8px;
  max-width: 100%;
}
.learning-strip {
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 36px;
  margin-top: 56px;
}
.learning-actions a {
  min-height: 44px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
/* Reading: a measured line length and a clear, quiet margin. */
.article-shell {
  max-width: 1200px;
  padding-top: 0;
}
.article-heading {
  max-width: 900px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.article-heading h1 {
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  max-width: 880px;
}
.article-deck {
  max-width: 740px;
  font-size: 18px;
  line-height: 1.75;
}
.article-byline {
  font-size: 12px;
  padding-top: 22px;
}
.reading-layout {
  grid-template-columns: minmax(0, 740px) 220px;
  gap: 64px;
}
.article-prose {
  font-size: 17px;
  line-height: 1.9;
  max-width: 70ch;
}
.article-prose h2 {
  font-size: 29px;
  margin-top: 2.2em;
  font-weight: 600;
}
.article-prose h3 {
  font-size: 23px;
}
.article-prose blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  padding: 16px 24px;
  border-radius: 0 8px 8px 0;
}
.article-prose pre {
  background: #202a25 !important;
  color: #e8eee6 !important;
  text-shadow: none !important;
  padding: 24px;
  font-size: 13px;
  line-height: 1.8;
}
.article-prose pre code {
  color: inherit;
  text-shadow: none !important;
}
.reading-progress {
  top: 0;
  height: 2px;
  z-index: 70;
}
.reading-progress span {
  background: var(--editorial-accent);
}
.reader-sidebar-inner {
  top: 108px;
}
.reader-practice {
  background: var(--bg-surface);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.reader-newsletter {
  background: var(--bg-surface);
  border: 1px solid var(--border);
}
.article-cover img {
  border-radius: 8px;
}
.article-breadcrumb {
  flex-wrap: wrap;
  padding: 28px 0;
}
.desktop-toc ol {
  max-height: 50vh;
}
.code-toolbar {
  background: var(--bg-surface);
}
/* Learning and practice share one typographic rhythm. */
.practice-heading {
  padding: 20px 0 34px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.practice-heading h1 {
  font-size: clamp(34px, 4.3vw, 54px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
  max-width: 830px;
}
.practice-heading p:not(.eyebrow) {
  font-size: 16px;
  line-height: 1.8;
  max-width: 650px;
}
.learning-page,
.practice-page,
.interview-page {
  padding-top: 38px;
}
.path-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.path-card {
  padding: 28px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.path-card:before {
  content: "";
  height: 5px;
  position: absolute;
  inset: 0 0 auto;
  background: var(--accent);
}
.path-card:nth-child(2):before {
  background: #7c9c61;
}
.path-card:nth-child(3):before {
  background: #bf975b;
}
.path-card h2 {
  font-size: 27px;
  line-height: 1.2;
  margin: 18px 0;
}
.path-card p:not(.eyebrow) {
  font-size: 14px;
}
.path-card-footer {
  flex-wrap: wrap;
  font-size: 12px;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 28px;
}
.path-how {
  max-width: none;
  padding: 30px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 10px;
}
.path-how p:not(.eyebrow) {
  max-width: 780px;
  font-size: 14px;
}
.path-intro-grid {
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.path-progress {
  background: var(--accent-light);
  border-color: var(--border);
  border-radius: 10px;
}
.path-steps > li {
  border-radius: 8px;
  padding: 26px;
  border-left: 3px solid var(--border);
}
.path-steps > li.is-complete {
  border-left-color: #71935e;
}
.path-step-number {
  font:
    15px ui-monospace,
    monospace;
  padding-top: 4px;
  min-width: 35px;
}
.path-step-content h2 {
  font-size: 22px;
  line-height: 1.4;
}
.path-step-content > p:not(.eyebrow) {
  font-size: 14px;
}
.path-step-actions label {
  background: var(--bg-surface);
  font-size: 12px;
}
.practice-dashboard {
  border-radius: 12px;
  box-shadow: none;
  background: var(--bg-card);
}
.practice-summary {
  background: var(--accent-light);
}
.practice-topic-card,
.interview-subject-card,
.roadmap-card,
.interview-question {
  border-radius: 9px;
  box-shadow: none;
  background: var(--bg-card);
}
.interview-subject-card h3 {
  letter-spacing: -0.035em;
}
.interview-search,
.practice-search {
  border-radius: 9px;
  background: var(--bg-card);
}
.interview-method {
  background: var(--bg-surface);
  border-radius: 10px;
  padding: 28px;
}
.interview-question summary {
  min-height: 72px;
}
.interview-answer {
  background: var(--bg-card);
}
/* Workspaces: tool-specific composition, shared materials. */
.tool-shell {
  --tool-bg: var(--bg-card);
  --tool-soft: var(--bg-surface);
  --tool-border: var(--border);
  --tool-ink: var(--text-primary);
  --tool-muted: var(--text-secondary);
  --tool-accent: var(--editorial-accent);
  max-width: 1248px;
  padding: 40px 40px 64px;
}
.dark .tool-shell {
  --tool-bg: var(--bg-card);
  --tool-soft: var(--bg-surface);
  --tool-border: var(--border);
  --tool-ink: var(--text-primary);
  --tool-muted: var(--text-secondary);
  --tool-accent: var(--editorial-accent);
}
.tool-hero {
  max-width: 800px;
  padding: 12px 0 40px;
}
.tool-hero h1 {
  font-size: clamp(38px, 4.6vw, 60px);
  font-weight: 600;
  letter-spacing: -0.05em;
}
.tool-hero p {
  font-size: 16px;
  max-width: 610px;
}
.tool-grid {
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
}
.tool-card {
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: transparent;
  padding: 28px;
  box-shadow: none !important;
}
.tool-card:hover {
  background: var(--bg-surface);
}
.tool-card-top {
  margin-bottom: 26px;
}
.tool-icon {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-primary);
  font-size: 14px;
}
.tool-card h3 {
  font-size: 22px;
  font-weight: 600;
}
.tool-card p {
  font-size: 13px;
}
.tool-heading {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.tool-heading h1 {
  font-size: 40px;
  font-weight: 600;
}
.tool-heading p {
  font-size: 15px;
}
.tool-badge {
  font-size: 10px;
  font-family: ui-monospace, monospace;
  border-radius: 5px;
  padding: 9px 12px;
}
.tool-panel {
  border-radius: 9px;
  background: var(--bg-card);
  padding: 20px;
}
.tool-shell textarea {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  height: 320px;
  min-height: 200px;
  font:
    14px/1.8 ui-monospace,
    monospace;
}
.tool-options {
  grid-column: 1/-1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 16px 20px;
  margin: 0;
  border-radius: 8px;
  align-items: center;
  gap: 20px;
}
.tool-options > label {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.tool-options select {
  background: var(--bg-card);
  font-size: 13px;
}
.tool-options:empty {
  display: none;
}
.tool-run {
  margin-top: 18px;
}
.tool-result-panel {
  position: static;
}
.tool-note {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 24px 0;
}
.tool-note p {
  max-width: 850px;
  font-size: 13px;
}
.tool-result-panel #tool-status {
  min-height: 22px;
}
.tool-metrics {
  font:
    11px ui-monospace,
    monospace;
}
.tool-actions button {
  font-size: 12px;
}
.tool-workbench {
  gap: 16px;
}
.tool-panel-heading {
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.tool-related {
  margin-top: 10px;
}
.tool-related h2 {
  font-size: 18px;
}
.tool-related a {
  font-size: 13px;
}
.tool-diff-line {
  font-size: 13px;
}
.tool-secondary-actions button {
  border-radius: 6px;
  background: var(--bg-primary);
}
[data-workbench="text_diff"] .tool-workbench {
  display: block;
}
[data-workbench="text_diff"] .tool-input-panel {
  margin-bottom: 16px;
}
[data-workbench="text_diff"] .tool-result-panel {
  position: static;
}
[data-workbench="text_diff"] .ce-compare-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
[data-workbench="text_diff"] .ce-compare-inputs label {
  display: block;
  font-size: 13px;
  margin-bottom: 12px;
}
[data-workbench="text_diff"] textarea {
  height: 240px;
  min-height: 180px;
}
[data-workbench="text_diff"] .tool-input-panel > .tool-panel-heading {
  margin-bottom: 20px;
}
[data-workbench="text_diff"] .tool-secondary-actions {
  float: right;
  margin-top: 18px;
}
[data-workbench="text_diff"] .tool-run {
  margin-top: 18px;
}
[data-workbench="text_diff"] .tool-diff-filter {
  margin-bottom: 0;
}
[data-workbench="text_diff"] #tool-diff {
  margin-top: 12px;
}
[data-workbench="password_generator"] .tool-workbench {
  grid-template-columns: 1fr 1.3fr;
}
[data-workbench="password_generator"] .tool-options {
  border: 0;
  padding: 0;
  background: none;
  margin: 12px 0 20px;
}
[data-workbench="password_generator"] .tool-result-panel {
  background: #222c27;
  color: #f4f5ed;
  padding: 32px;
}
[data-workbench="password_generator"] #tool-output {
  color: #edf3e5;
  background: #18211c;
  border-color: #45584a;
  font-size: 24px;
  line-height: 1.7;
  height: 190px;
  min-height: 190px;
}
[data-workbench="password_generator"] .tool-result-panel #tool-status {
  color: #c4d0c3;
}
[data-workbench="password_generator"] .tool-result-panel .tool-actions button {
  color: #d4e9ab;
}
[data-workbench="password_generator"] .tool-panel-heading {
  border-color: var(--border);
}
[data-workbench="password_generator"] .tool-result-panel .tool-panel-heading {
  border-color: #45584a;
}
[data-workbench="password_generator"]
  .tool-result-panel
  #tool-status[data-error="true"] {
  color: #ffb8b8;
}
@media (min-width: 1024px) {
  .article-main {
    padding-right: 0;
  }
  .reading-layout {
    justify-content: space-between;
  }
}
@media (max-width: 1100px) {
  .ce-header {
    gap: 20px;
    padding: 0 24px;
  }
  .ce-nav {
    gap: 18px;
  }
  .ce-start {
    display: none;
  }
  .ce-home-hero {
    gap: 36px;
  }
  .ce-hero-copy h1 {
    font-size: 56px;
  }
  .ce-start-here {
    padding: 24px;
  }
  .ce-footer-grid {
    gap: 26px;
  }
  .path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .reading-layout {
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 36px;
  }
}
@media (max-width: 900px) {
  .ce-nav {
    display: none;
  }
  .ce-header-actions {
    margin-left: auto;
  }
  .ce-mobile-nav {
    display: block;
  }
  .ce-mobile-nav summary {
    list-style: none;
    display: flex;
    gap: 14px;
    align-items: center;
    min-height: 44px;
    cursor: pointer;
    font-size: 13px;
  }
  .ce-mobile-nav summary::-webkit-details-marker {
    display: none;
  }
  .ce-mobile-nav[open] summary > span {
    transform: rotate(45deg);
  }
  .ce-mobile-nav nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 75px;
    padding: 16px 24px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 24px #0000000d;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  .ce-mobile-nav nav a {
    padding: 14px;
    font-size: 15px;
    border-radius: 6px;
  }
  .ce-mobile-nav nav a:hover {
    background: var(--bg-surface);
  }
  .ce-home-hero {
    gap: 28px;
    grid-template-columns: 1fr 1fr;
    padding-top: 48px;
  }
  .ce-hero-copy h1 {
    font-size: 48px;
  }
  .ce-hero-actions {
    gap: 20px;
  }
  .ce-start-here h2 {
    font-size: 26px;
  }
  .ce-hero-footnote {
    gap: 10px;
  }
  .discovery-page .spotlight-grid {
    grid-template-columns: 1fr 1fr;
  }
  .discovery-page .spotlight-lead {
    grid-column: 1/-1;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .discovery-page .reading-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ce-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .reading-layout {
    grid-template-columns: 1fr;
  }
  .reader-sidebar {
    display: none;
  }
  .article-heading {
    max-width: 100%;
  }
  .tool-shell textarea,
  .tool-options select {
    font-size: 16px;
  }
  .tool-shell textarea {
    height: 260px;
  }
  .tool-options {
    gap: 12px;
  }
  .tool-options > label {
    flex-direction: column;
    align-items: flex-start;
  }
  .tool-result-panel {
    scroll-margin-top: 96px;
  }
  [data-workbench="password_generator"] .tool-workbench {
    grid-template-columns: 1fr;
  }
  [data-workbench="password_generator"] .tool-result-panel {
    order: -1;
  }
  .tool-heading h1 {
    font-size: 34px;
  }
  .tool-primary {
    width: auto;
  }
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .ce-header {
    height: 68px;
    padding: 0 18px;
    gap: 14px;
  }
  .ce-brand {
    font-size: 21px;
  }
  .ce-brand-logo {
    width: 156px;
  }
  .ce-icon-button {
    width: 36px;
  }
  .ce-header-actions {
    gap: 0;
  }
  .ce-mobile-nav summary {
    gap: 7px;
  }
  .ce-mobile-nav nav {
    top: 67px;
    grid-template-columns: 1fr 1fr;
  }
  .editorial-shell,
  .tool-shell {
    padding-left: 20px;
    padding-right: 20px;
  }
  .ce-home-hero {
    grid-template-columns: 1fr;
    padding: 36px 0 32px;
    gap: 32px;
  }
  .ce-hero-copy h1 {
    font-size: 50px;
    margin: 18px 0;
    line-height: 1.04;
  }
  .ce-hero-copy > p:not(.eyebrow) {
    font-size: 16px;
  }
  .ce-hero-actions {
    gap: 18px;
    margin-top: 24px;
  }
  .ce-hero-footnote {
    margin-top: 20px;
    font-size: 10px;
    gap: 12px;
  }
  .ce-start-here {
    padding: 24px;
    box-shadow: 6px 6px 0 var(--bg-surface);
  }
  .ce-start-here h2 {
    font-size: 28px;
    margin: 20px 0;
  }
  .ce-start-routes > a {
    padding: 15px 0;
  }
  .ce-home-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin: 8px 0 36px;
    padding: 20px 0;
  }
  .ce-home-search label {
    grid-column: 1/-1;
  }
  .ce-home-search button {
    font-size: 12px;
    gap: 6px;
  }
  .ce-home-search input {
    font-size: 16px;
    padding: 12px;
    min-width: 0;
    width: 100%;
  }
  .ce-section-label {
    font-size: 9px;
    letter-spacing: 0.08em;
  }
  .discovery-page .spotlight-grid {
    display: block;
  }
  .discovery-page .spotlight-card {
    border: 0;
    border-bottom: 1px solid var(--border);
  }
  .discovery-page .spotlight-card:last-child {
    border-bottom: 0;
  }
  .discovery-page .spotlight-copy {
    padding: 24px !important;
  }
  .discovery-page .spotlight-copy .card-meta {
    display: flex;
    margin-bottom: 14px !important;
  }
  .discovery-page .spotlight-copy .card-meta > span:first-child {
    display: block !important;
  }
  .discovery-page .spotlight-lead h2 {
    font-size: 26px;
  }
  .discovery-page .spotlight-card:not(.spotlight-lead) h2 {
    font-size: 22px;
    margin: 10px 0 14px;
  }
  .discovery-page .spotlight-copy p {
    display: block !important;
  }
  .discovery-page .reading-grid {
    grid-template-columns: 1fr;
  }
  .discovery-page .reading-card {
    display: flex !important;
  }
  .discovery-page .reading-card-body {
    padding: 24px;
  }
  .discovery-page .reading-card h3 {
    font-size: 23px;
  }
  .discovery-page .article-library {
    margin-top: 44px;
  }
  .section-heading {
    gap: 16px;
    align-items: start;
    flex-wrap: wrap;
  }
  .section-heading h1,
  .section-heading h2 {
    font-size: 30px;
  }
  .library-count {
    font-size: 11px;
  }
  .learning-strip {
    display: block;
    padding: 26px;
  }
  .learning-actions {
    margin-top: 20px;
  }
  .ce-footer {
    padding: 36px 20px 24px;
  }
  .ce-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .ce-footer-brand,
  .ce-footer-newsletter {
    grid-column: 1/-1;
  }
  .ce-footer-bottom {
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 32px;
    font-size: 10px;
  }
  .ce-footer-newsletter input {
    font-size: 16px;
  }
  .article-heading h1 {
    font-size: 36px;
  }
  .article-heading {
    margin-bottom: 28px;
    padding-bottom: 26px;
  }
  .article-deck {
    font-size: 16px;
  }
  .article-prose {
    font-size: 16px;
    line-height: 1.85;
  }
  .article-prose h2 {
    font-size: 27px;
  }
  .article-prose pre {
    padding: 18px;
    font-size: 12px;
  }
  .article-breadcrumb {
    font-size: 11px;
    padding: 22px 0;
  }
  .learning-page,
  .practice-page,
  .interview-page {
    padding-top: 24px;
  }
  .practice-heading {
    padding-top: 12px;
  }
  .practice-heading h1 {
    font-size: 36px;
  }
  .practice-heading p:not(.eyebrow) {
    font-size: 15px;
  }
  .path-grid {
    grid-template-columns: 1fr;
  }
  .path-card {
    padding: 26px;
  }
  .path-steps > li {
    padding: 20px 16px;
  }
  .path-step-content h2 {
    font-size: 20px;
  }
  .path-intro-grid {
    gap: 24px;
  }
  .path-how {
    padding: 24px;
  }
  .interview-method {
    padding: 24px;
  }
  .tool-shell {
    padding-top: 28px;
  }
  .tool-hero h1 {
    font-size: 40px;
  }
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .tool-card {
    border-right: 0;
    padding: 24px;
  }
  .tool-heading h1 {
    font-size: 34px;
  }
  .tool-heading {
    padding-bottom: 22px;
  }
  .tool-panel {
    padding: 16px;
  }
  .tool-options {
    padding: 16px;
    gap: 16px;
  }
  .tool-options > label {
    flex: 1;
    min-width: 110px;
  }
  .tool-options select {
    width: 100%;
  }
  .tool-primary {
    width: 100%;
  }
  .tool-shell textarea {
    height: 240px;
    min-height: 180px;
  }
  .tool-panel-heading {
    flex-wrap: wrap;
  }
  .tool-actions {
    gap: 0;
  }
  .tool-actions button {
    padding: 8px;
  }
  .tool-badge {
    white-space: normal;
  }
  .tool-related > div {
    display: grid;
    gap: 4px;
  }
  .tool-note p {
    font-size: 13px;
  }
  [data-workbench="text_diff"] .ce-compare-inputs {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  [data-workbench="text_diff"] textarea {
    height: 180px;
  }
  [data-workbench="text_diff"] .tool-secondary-actions {
    float: none;
  }
  [data-workbench="password_generator"] .tool-result-panel {
    padding: 24px;
  }
  [data-workbench="password_generator"] #tool-output {
    font-size: 20px;
    height: 140px;
    min-height: 140px;
  }
  .tool-diff-line {
    grid-template-columns: 24px 24px minmax(0, 1fr);
    gap: 4px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

/* Informational pages retain their content and use the same reading system. */
body[data-section] {
  color: var(--text-primary);
}
.ce-static {
  padding: 48px 20px 64px;
}
.ce-static > div {
  max-width: 820px;
  padding: 0;
}
.ce-static .prose {
  font-family: system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-secondary);
}
.ce-static :is(h1, h2, h3) {
  font-family: Outfit, system-ui, sans-serif;
  color: var(--text-primary) !important;
}
.ce-static h1 {
  font-size: 48px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.04em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
}
.ce-static h2 {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.ce-static p,
.ce-static li {
  color: var(--text-secondary);
}
.ce-static a {
  color: var(--editorial-accent);
}
.ce-contact > div {
  max-width: 680px;
}
.ce-contact h1,
.ce-contact > div > p {
  text-align: left;
}
.ce-contact form input,
.ce-contact form textarea {
  background: var(--bg-primary);
  border-color: var(--border);
  color: var(--text-primary);
  font-size: 16px;
}
.ce-contact > div > div:has(form) {
  background: var(--bg-card);
  border-color: var(--border);
  border-radius: 10px;
}
.ce-contact form label {
  color: var(--text-primary);
}
.ce-contact form button {
  background: #484bc1;
}
.article-prose pre .token:is(.comment, .prolog, .doctype, .cdata) {
  color: #a2b8a6;
}
.article-prose pre .token:is(.keyword, .atrule, .property, .tag) {
  color: #c2c4ff;
}
.article-prose pre .token:is(.string, .attr-value, .selector) {
  color: #d7e9ac;
}
.article-prose pre .token:is(.function, .number, .boolean) {
  color: #f3c790;
}
.article-prose pre .token:is(.operator, .punctuation) {
  color: #d8e1d9;
  background: none;
}
@media (max-width: 640px) {
  .ce-static {
    padding: 28px 20px 48px;
  }
  .ce-static h1 {
    font-size: 36px;
  }
  .ce-static h2 {
    font-size: 24px;
  }
  .ce-hero-copy h1 {
    font-size: clamp(38px, 10vw, 50px);
  }
}

.path-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.path-card-footer {
  margin-top: auto;
  padding-top: 20px;
}
.path-card > p:not(.eyebrow) {
  margin-bottom: 28px;
}
.tool-result-panel > textarea ~ #tool-status {
  margin-top: 16px;
}
.tool-result-panel > textarea ~ .tool-metrics {
  margin-bottom: 0;
}
.tool-options {
  min-width: 0;
}
.ce-home-hero h1,
.practice-heading h1,
.article-heading h1 {
  text-wrap: balance;
}
@media (max-width: 640px) {
  .interview-search input,
  .interview-search select,
  .library-search input,
  .practice-search input,
  .mobile-topic-picker select {
    font-size: 16px;
  }
}

.ce-search-page {
  max-width: 1040px;
  padding-top: 40px;
  min-height: 65vh;
}
.ce-search-results > .eyebrow {
  margin: 28px 0 14px;
}
.ce-search-results > a {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 25px 0;
  border-bottom: 1px solid var(--border);
}
.ce-search-results > a > div {
  flex: 1;
  min-width: 0;
}
.ce-result-kind {
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 0.02em;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 8px 10px;
  min-width: 78px;
  text-align: center;
  color: var(--text-secondary);
}
.ce-search-results h2 {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ce-search-results p:not(.eyebrow) {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 5px;
}
.ce-search-results > a:hover h2 {
  color: var(--editorial-accent);
}
.ce-search-suggestions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  padding: 20px 0;
}
.ce-search-suggestions p {
  width: 100%;
}
.ce-search-suggestions a {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-card);
}
.ce-resources > div {
  max-width: 1248px;
  padding-left: 40px;
  padding-right: 40px;
}
.ce-resources h1,
.practice-lesson h1 {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text-primary) !important;
}
.ce-resources .grid > div {
  background: var(--bg-card);
  border-color: var(--border);
  border-radius: 10px;
  box-shadow: none;
}
.ce-resources h3 {
  color: var(--text-primary) !important;
  font-size: 22px;
}
.ce-resources p {
  color: var(--text-secondary);
}
.ce-resources a {
  min-height: 44px;
}
.practice-lesson :is(.prose, .prose p) {
  color: var(--text-secondary);
}
.practice-lesson h2 {
  color: var(--text-primary);
}
@media (max-width: 640px) {
  .ce-search-page {
    padding-top: 24px;
  }
  .ce-search-results > a {
    gap: 12px;
    flex-wrap: wrap;
    padding: 22px 0;
  }
  .ce-result-kind {
    font-size: 9px;
    min-width: auto;
  }
  .ce-search-results h2 {
    font-size: 19px;
  }
  .ce-search-results > a > div {
    flex-basis: 75%;
  }
  .ce-resources > div {
    padding: 0 20px;
  }
  .ce-resources h1,
  .practice-lesson h1 {
    font-size: 34px;
  }
}
.ce-contact form input,
.ce-contact form textarea {
  background: var(--bg-primary) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}
.ce-contact > div > div:has(form) {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
}
.ce-contact form label {
  color: var(--text-primary) !important;
}

.ce-search-suggestions .ce-search-instruction {font-size:14px;letter-spacing:0;color:var(--text-secondary);}

/* Reading pagination and accessible contact feedback. */
.article-pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding: 1.25rem 0; border-top: 1px solid var(--ce-line, #dbe2e8); font-size: .875rem; }
.article-pagination a { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.contact-input { display: block; width: 100%; margin-top: .5rem; padding: .75rem 1rem; border: 1px solid #94a3b8; border-radius: .5rem; color: inherit; background: transparent; }
.contact-input:focus-visible { outline: 2px solid #0d9488; outline-offset: 2px; }
.contact-input[aria-invalid="true"] { border-color: #dc2626; }
.ce-contact .errorlist { margin-top: .5rem; color: #b91c1c; font-size: .875rem; list-style: none; padding: 0; }
.dark .ce-contact .errorlist { color: #fca5a5; }
