:root {
  --ink: #101828;
  --muted: #667085;
  --line: #d9e1ea;
  --soft-line: #edf2f7;
  --panel: #ffffff;
  --page: #f6f8fb;
  --green: #15803d;
  --green-dark: #116832;
  --green-soft: #e8f7ee;
  --gold: #f2b705;
  --blue: #47637d;
  --shadow: 0 16px 40px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--page);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 2.6rem;
  border: 0;
  border-radius: 8px;
  padding: 0 1rem;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

button:hover {
  background: var(--green-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 5.25rem;
  border-bottom: 1px solid var(--soft-line);
  padding: 0 2.25rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.03);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid var(--green);
  border-radius: 8px;
  color: var(--green);
  font-size: 1.35rem;
  line-height: 1;
}

.site-brand strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
}

.site-brand small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

.site-nav a {
  color: #344054;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a.is-active {
  color: var(--green);
}

.account-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: #344054;
}

.account-pill:hover {
  background: transparent;
  color: var(--green);
}

.account-pill span {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(23rem, 0.9fr) minmax(32rem, 1.3fr);
  gap: 1.25rem;
  width: min(1500px, calc(100% - 4rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
}

.app-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  display: none;
}

.app-banner h1 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.1;
}

.app-banner p,
p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.banner-tagline {
  margin-top: 0.35rem !important;
  font-size: 0.95rem;
  max-width: 42ch;
}

.banner-steps {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.banner-step {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  background: var(--green-soft);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  max-width: 14ch;
  line-height: 1.3;
}

.banner-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  flex-shrink: 0;
}

.banner-step-arrow {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.recipe-panel {
  min-width: 0;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.input-panel,
.output-panel {
  padding: 0;
}

.serving-converter,
.ingredient-scaling,
.smart-rounding,
.recipe-import-heading,
.import-tabs,
.import-mode,
.import-status,
.recipe-entry,
.actions {
  padding-inline: 1.25rem;
}

.serving-converter,
.ingredient-scaling,
.smart-rounding {
  display: grid;
  gap: 0.9rem;
  border-bottom: 1px solid var(--soft-line);
  padding-block: 1.25rem;
  background: #fff;
}

.serving-converter {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.panel-heading {
  margin-bottom: 0.8rem;
}

.panel-heading.compact {
  margin-bottom: 0;
}

h2,
h3 {
  margin: 0;
  color: var(--ink);
}

h2 {
  font-size: 1.25rem;
  line-height: 1.2;
}

h3 {
  font-size: 1.65rem;
}

.serving-grid,
.ingredient-scale-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.ingredient-scale-grid {
  grid-template-columns: 0.72fr 1fr 1.1fr;
}

label {
  display: grid;
  gap: 0.45rem;
  color: #344054;
  font-size: 0.86rem;
  font-weight: 800;
}

input,
select,
textarea,
.recipe-output {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

input,
select {
  height: 3rem;
  padding: 0 0.85rem;
}

textarea {
  min-height: 7rem;
  padding: 0.9rem;
  resize: vertical;
  line-height: 1.55;
}

textarea:focus,
input:focus,
select:focus {
  outline: 3px solid rgba(21, 128, 61, 0.16);
  border-color: var(--green);
}

.multiplier-summary,
.single-ingredient-result {
  border: 1px solid #ccebd6;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

.unit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.unit-list span {
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
  background: #f8fafc;
  color: #475467;
  font-size: 0.78rem;
  font-weight: 800;
}

.recipe-import-heading {
  padding-top: 1.25rem;
  padding-bottom: 0;
}

.input-panel > .recipe-import-heading:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.import-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 0.6rem;
  border-bottom: 1px solid var(--line);
}

.import-tab {
  min-height: 3rem;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #475467;
  text-align: center;
}

.import-tab:hover,
.import-tab.is-active {
  border-bottom-color: var(--green);
  background: transparent;
  color: var(--green);
}

.import-tab:disabled {
  display: none;
}

.import-mode {
  display: none;
  gap: 0.75rem;
  padding-top: 1rem;
  padding-bottom: 0.4rem;
}

.import-mode.is-active {
  display: grid;
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.full-recipe-text {
  min-height: 7rem;
}

.server-hint,
.import-status {
  min-height: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.server-hint:empty,
.import-status:empty {
  display: none;
}

.import-status[data-tone="success"] {
  color: var(--green);
  font-weight: 800;
}

.import-status[data-tone="error"] {
  color: #c2410c;
  font-weight: 800;
}

.recipe-entry {
  padding-top: 0.5rem;
}

.recipe-entry textarea {
  min-height: 13rem;
}

.rounding-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.rounding-toggle label {
  display: flex;
  align-items: center;
  min-height: 3.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  cursor: pointer;
}

.rounding-toggle label:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.rounding-toggle input {
  width: auto;
  height: auto;
  margin: 0;
  accent-color: var(--green);
}

.actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  padding-bottom: 1.25rem;
}

button.secondary,
.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  color: #344054;
}

button.secondary:hover,
.icon-button:hover {
  background: #f8fafc;
}

.output-panel {
  align-self: start;
  overflow: hidden;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--soft-line);
  padding: 1.25rem;
}

.output-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.print-button {
  background: var(--green);
}

.scale-meter {
  overflow: hidden;
  height: 0.35rem;
  background: #edf2f7;
}

.scale-meter div {
  width: 0;
  height: 100%;
  max-width: 100%;
  background: var(--green);
  transition: width 180ms ease;
}

.recipe-summary-card {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: 1.4rem;
  padding: 1.5rem 1.25rem;
}

.recipe-logo-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 24%, rgba(242, 183, 5, 0.26), transparent 24%),
    linear-gradient(135deg, #e8f7ee, #ffffff 54%, #dbeafe);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.12);
}

.recipe-logo-mark {
  display: grid;
  place-items: center;
  width: 5.2rem;
  height: 5.2rem;
  border: 3px solid var(--green);
  border-radius: 50%;
  background: #fff;
  color: var(--green);
  font-size: 2.4rem;
  font-weight: 900;
}

.recipe-logo-line,
.recipe-logo-dot {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: var(--green);
}

.recipe-logo-line {
  right: 1.1rem;
  bottom: 1.1rem;
  width: 4.5rem;
  height: 0.45rem;
}

.recipe-logo-dot {
  left: 1.1rem;
  top: 1.1rem;
  width: 1rem;
  height: 1rem;
  background: var(--gold);
}

.recipe-summary-card p {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-top: 0.9rem;
  font-size: 1.05rem;
}

#outputTargetServings,
.converted-value {
  color: var(--green);
  font-weight: 900;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1rem;
  color: #475467;
  font-weight: 700;
}

.converted-tabs {
  display: flex;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  margin: 0 1.25rem;
  overflow: hidden;
}

.converted-tabs button {
  min-height: 2.8rem;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  background: #fff;
  color: #344054;
}

.converted-tabs button.is-active {
  border-bottom-color: var(--green);
  color: var(--green);
}

.converted-view {
  display: none;
}

.converted-view.is-active {
  display: block;
}

.converted-table-wrap {
  margin: 0 1.25rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  overflow: auto;
}

.converted-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 42rem;
  font-size: 0.95rem;
}

.converted-table th,
.converted-table td {
  border-bottom: 1px solid var(--soft-line);
  padding: 0.8rem 0.9rem;
  text-align: left;
  vertical-align: middle;
}

.converted-table th {
  color: #344054;
  font-size: 0.86rem;
}

.converted-table tr:last-child td {
  border-bottom: 0;
}

.instruction-list {
  display: grid;
  gap: 0.85rem;
  margin: 0 1.25rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  padding: 1rem 1.25rem 1rem 2.8rem;
  background: #fff;
}

.instruction-list li {
  padding-left: 0.2rem;
  line-height: 1.6;
}

.instruction-list li::marker {
  color: var(--green);
  font-weight: 900;
}

.ingredient-name-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
}

.ingredient-dot {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid #cfe3d7;
  border-radius: 6px;
  background: #f0fbf4;
  color: var(--green);
  font-size: 0.82rem;
}

.smart-tip {
  margin: 0 1.25rem 1.25rem;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 1rem;
  background: #fffbeb;
}

.smart-tip strong {
  display: block;
  margin-bottom: 0.35rem;
}

.recipe-output {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.guide-panel {
  grid-column: 1 / -1;
  padding: 1.25rem;
}

.guide-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.guide-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.guide-filters button {
  min-height: 2.35rem;
  border: 1px solid var(--line);
  background: #fff;
  color: #344054;
}

.guide-filters button:hover,
.guide-filters button.is-active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.95fr) minmax(0, 1.35fr);
  gap: 1rem;
}

.guide-subheader {
  margin: 1.35rem 0 1rem;
  border-top: 1px solid var(--soft-line);
  padding-top: 1.25rem;
}

.guide-subheader h3 {
  font-size: 1.2rem;
}

.guide-subheader p {
  margin-top: 0.3rem;
}

.guide-list {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.guide-card {
  display: grid;
  gap: 0.4rem;
  width: 100%;
  min-height: 8.75rem;
  border: 1px solid var(--line);
  padding: 0.95rem;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.guide-card:hover,
.guide-card.is-active {
  border-color: var(--green);
  background: #f8fcfa;
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.08);
}

.guide-card-label,
.guide-reader-meta {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.guide-card strong {
  font-size: 1.02rem;
  line-height: 1.25;
}

.guide-card span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
}

.guide-reader {
  display: grid;
  align-content: start;
  gap: 1rem;
  min-height: 24rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  background: #fff;
}

.guide-reader h3 {
  margin-top: 0.25rem;
  font-size: 1.75rem;
}

.guide-reader p {
  margin-top: 0.7rem;
  font-size: 1rem;
}

.guide-reader-steps {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding-left: 1.25rem;
}

.guide-reader-steps li {
  color: #344054;
  line-height: 1.65;
}

.guide-reader-steps li::marker {
  color: var(--green);
  font-weight: 900;
}

.article-draft-workspace {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(0, 1.5fr);
  gap: 1rem;
  border: 1px solid #ccebd6;
  border-radius: 8px;
  padding: 1rem;
  background: #f8fcfa;
}

.draft-list-panel,
.locked-article-reader {
  display: grid;
  align-content: start;
  gap: 0.85rem;
}

.draft-list-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.draft-list-header h3 {
  font-size: 1.1rem;
}

.draft-list-header p {
  font-size: 0.9rem;
}

.draft-article-list {
  display: grid;
  gap: 0.65rem;
}

.draft-article-item {
  display: grid;
  gap: 0.25rem;
  width: 100%;
  min-height: auto;
  border: 1px solid var(--line);
  padding: 0.7rem;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.draft-article-item:hover,
.draft-article-item.is-active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--ink);
}

.draft-article-item strong,
.draft-article-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-article-item span,
.draft-article-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.locked-article-reader {
  min-height: 18rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
}

.locked-article-meta {
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 900;
}

.locked-article-reader h3 {
  margin-top: 0.25rem;
  font-size: 1.45rem;
}

.locked-article-body {
  color: #344054;
  line-height: 1.7;
  white-space: pre-wrap;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(16, 24, 40, 0.48);
}

.modal.is-open {
  display: grid;
}

.modal-panel {
  width: min(36rem, 100%);
  max-height: min(44rem, calc(100vh - 2rem));
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.24);
}

.modal-header,
.saved-recipes-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.modal-header {
  border-bottom: 1px solid var(--soft-line);
  padding: 1.25rem;
}

.account-form,
.saved-recipes-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem;
}

.saved-recipes-panel {
  border-top: 1px solid var(--soft-line);
}

.saved-recipes-list {
  display: grid;
  gap: 0.65rem;
}

.saved-recipe-card {
  display: grid;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  background: #fff;
}

.saved-recipe-card strong {
  color: var(--ink);
}

.saved-recipe-card span {
  color: var(--muted);
  font-size: 0.85rem;
}

.saved-recipe-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

@media (max-width: 1050px) {
  .site-nav {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header,
  .app-banner,
  .output-header,
  .guide-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    position: static;
    padding: 1rem;
  }

  .app-shell {
    width: min(100% - 1rem, 1500px);
    padding-top: 0.75rem;
  }

  .serving-grid,
  .ingredient-scale-grid,
  .url-row,
  .import-tabs,
  .rounding-toggle,
  .recipe-summary-card,
  .guide-layout,
  .article-draft-workspace {
    grid-template-columns: 1fr;
  }

  .output-actions,
  .actions {
    width: 100%;
    flex-direction: column;
  }

  .output-actions button,
  .actions button {
    width: 100%;
  }

  .guide-filters {
    justify-content: flex-start;
  }

  .guide-reader {
    min-height: auto;
  }

  .draft-list-header {
    flex-direction: column;
  }
}

/* ─── How It Works ──────────────────────────────────── */

.how-it-works {
  width: min(1500px, calc(100% - 4rem));
  margin: 0 auto 2.5rem;
}

.how-inner {
  display: grid;
  gap: 1.75rem;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 2rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.how-lead h2 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

.how-lead p {
  max-width: 70ch;
  color: var(--muted);
  line-height: 1.65;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.how-step {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 1.1rem;
  background: var(--page);
}

.how-step h3 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.how-step p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.how-uses h3 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.use-case-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding-left: 1.25rem;
  color: #344054;
  line-height: 1.65;
}

.use-case-list li::marker {
  color: var(--green);
}

/* ─── Footer ─────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--soft-line);
  padding: 1.5rem 2.25rem;
  background: #fff;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: min(1500px, 100%);
  margin: 0 auto;
}

.footer-brand {
  display: grid;
  gap: 0.15rem;
  margin-right: auto;
}

.footer-brand strong {
  color: var(--ink);
  font-size: 1rem;
}

.footer-brand span {
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  color: #344054;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--green);
}

.footer-copy {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ─── Print ──────────────────────────────────────────── */

@media (max-width: 720px) {
  .how-steps {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* ─── Article Pages ──────────────────────────────────── */

.article-list-main {
  width: min(1200px, calc(100% - 4rem));
  margin: 2.5rem auto;
  padding-bottom: 4rem;
}

.article-list-container {
  display: grid;
  gap: 2.5rem;
}

.article-list-header {
  text-align: center;
}

.article-list-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2.2rem;
  line-height: 1.2;
}

.article-list-header p {
  font-size: 1.05rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.article-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
}

.article-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 1.5rem;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}

.article-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}

.article-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--ink);
}

.article-card-excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.article-card-date {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.article-list-cta {
  text-align: center;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 2rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.article-list-cta h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.article-list-cta p {
  margin: 0 0 1.25rem;
}

/* ─── Article Detail Page ────────────────────────────── */

.article-page-main {
  width: min(1200px, calc(100% - 4rem));
  margin: 2.5rem auto;
  padding-bottom: 4rem;
}

.article-page-container {
  display: grid;
  gap: 1.5rem;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.article-breadcrumb a {
  color: var(--green);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article-page-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  align-items: start;
}

.article-content-card {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 2rem 2.25rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.article-content-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--soft-line);
}

.article-date {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.article-content-header h1 {
  margin: 0;
  font-size: 1.95rem;
  line-height: 1.25;
}

.article-body h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--ink);
}

.article-body h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.article-body p {
  margin: 0 0 1rem;
  color: #344054;
  line-height: 1.75;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.1rem;
  padding-left: 1.5rem;
  color: #344054;
  line-height: 1.7;
}

.article-body li {
  margin-bottom: 0.45rem;
}

.article-body a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.article-body a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.article-body strong {
  color: var(--ink);
  font-weight: 700;
}

.article-sidebar {
  position: sticky;
  top: 6rem;
}

.article-cta-card {
  border: 1px solid #bbf0d0;
  border-radius: 8px;
  padding: 1.5rem;
  background: var(--green-soft);
}

.article-cta-label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
}

.article-cta-card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--ink);
}

.article-cta-card p {
  margin: 0 0 1.1rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.article-cta-button {
  display: inline-block;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s;
}

.article-cta-button:hover {
  background: var(--green-dark);
}

@media (max-width: 860px) {
  .article-page-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .article-content-header h1 {
    font-size: 1.5rem;
  }

  .article-content-card {
    padding: 1.25rem;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .app-banner,
  .input-panel,
  .guide-panel,
  .output-actions,
  .smart-tip,
  .how-it-works,
  .site-footer,
  .modal {
    display: none !important;
  }

  .app-shell {
    display: block;
    width: 100%;
    padding: 0;
  }

  .output-panel {
    border: 0;
    box-shadow: none;
  }

  .converted-table {
    min-width: 0;
  }
}
