:root {
  --bg: #f7f4ec;
  --panel: #ffffff;
  --text: #202124;
  --muted: #667085;
  --line: #e4ded2;
  --accent: #1f7668;
  --accent-soft: #e7f4ef;
  --yellow-soft: #fff7db;
  --blue: #315a8a;
  --blue-soft: #eaf1f8;
  --pink: #b85d72;
  --pink-soft: #fcecf0;
  --warm: #9b5a2c;
  --warm-soft: #fff1d9;
  --ink: #344054;
  --shadow: 0 18px 45px rgba(58, 42, 24, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--accent); font-weight: 700; text-decoration-thickness: 1px; }

header {
  background:
    linear-gradient(180deg, #fffaf0 0%, #fffdf8 62%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}

.wrap {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(96, 69, 35, .12));
}

.brand-stack {
  display: grid;
  line-height: 1.18;
}

.brand-stack small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  font-size: 14px;
}

.topbar nav a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 0;
  padding: 4px 2px;
  color: var(--ink);
  text-decoration: none;
}

.topbar nav a[aria-current="page"] {
  border-bottom: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
}

.hero {
  padding: 38px 0 34px;
}

.hero-omochi {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 244, 216, .95), transparent 34%),
    linear-gradient(180deg, #fffaf0 0%, #fffdf8 66%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.hero-copy {
  width: 100%;
  max-width: 820px;
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 10px;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--warm);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.eyebrow img {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 7px 14px rgba(96, 69, 35, .1));
}

.eyebrow-label {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid #ead7b8;
  border-radius: 999px;
  padding: 4px 12px;
  background: #fffaf0;
  box-shadow: 0 8px 20px rgba(96, 69, 35, .08);
}

h1 {
  margin: 0;
  width: 100%;
  max-width: 920px;
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  line-break: strict;
}

h2 {
  margin: 34px 0 14px;
  font-size: 22px;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 0;
}

p { color: var(--muted); }

.lead {
  width: 100%;
  max-width: 780px;
  margin: 14px auto 0;
  font-size: 16px;
  overflow-wrap: anywhere;
  line-break: strict;
}

.mobile-break {
  display: none;
}

.hero-advisor {
  display: grid;
  width: 100%;
  max-width: 680px;
  justify-items: center;
}

.hero-mochi {
  position: relative;
  display: grid;
  z-index: 2;
  width: min(232px, 70%);
  margin: 0 auto -22px;
  place-items: center;
}

.hero-mochi img {
  position: relative;
  width: min(190px, 100%);
  filter: drop-shadow(0 20px 28px rgba(96, 69, 35, .18));
  transform-origin: 50% 70%;
  animation: mochi-breathe 3.8s ease-in-out infinite;
}

.hero-mochi p {
  width: auto;
  max-width: 100%;
  margin: -4px 0 0;
  border: 1px solid #ead7b8;
  border-radius: 999px;
  padding: 4px 10px;
  background: #fffaf0;
  color: var(--warm);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: center;
  box-shadow: 0 8px 22px rgba(58, 42, 24, .08);
}

.hero-consult {
  width: 100%;
  border: 1px solid #ead7b8;
  border-radius: 8px;
  padding: 32px 14px 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
  text-align: left;
}

.hero-consult label {
  display: block;
  color: var(--warm);
  font-size: 13px;
  font-weight: 850;
}

.consult-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}

.consult-row input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.consult-row button {
  position: relative;
  min-height: 46px;
  border: 1px solid #1f7668;
  border-radius: 8px;
  padding: 10px 14px;
  background: #1f7668;
  color: #fff;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(31, 118, 104, .18);
  overflow: hidden;
}

.consult-row button::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 18px;
  height: 12px;
  border: 1.5px solid #fff;
  border-radius: 7px 7px 5px 5px;
  background: rgba(255, 255, 255, .2);
  transform: translateY(-50%) rotate(-2deg);
}

.consult-row button span {
  position: relative;
  display: inline-block;
  padding-left: 18px;
}

.consult-note {
  margin: 9px 0 0;
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.intent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.intent-chips button {
  min-height: 32px;
  border: 1px solid #d6e8e2;
  border-radius: 999px;
  padding: 5px 10px;
  background: #f6fffb;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.consult-result {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f0f8f5;
}

.empty-result {
  border: 1px solid #d6e8e2;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, .76);
}

.empty-result strong {
  display: block;
  color: var(--ink);
}

.empty-result p {
  margin: 4px 0 0;
  font-size: 13px;
}

.request-cta {
  border: 1px solid #ead7b8;
  border-radius: 8px;
  padding: 12px;
  background: #fffaf0;
}

.request-cta strong {
  display: block;
  color: var(--warm);
}

.request-cta p {
  margin: 4px 0 10px;
  font-size: 13px;
}

.request-cta a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.consult-result span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.result-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.result-item {
  display: grid;
  gap: 3px;
  border: 1px solid #d6e8e2;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, .76);
  color: var(--ink);
  text-decoration: none;
}

.result-item small {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.result-item strong {
  display: block;
  line-height: 1.4;
}

.result-item em {
  color: var(--warm);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.45;
}

.result-item p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.takeout-area {
  margin-top: 12px;
  border-top: 1px solid #f0e2ca;
  padding-top: 12px;
  text-align: center;
}

.takeout-button {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9b778;
  border-radius: 8px;
  padding: 9px 14px;
  background: #fff4d8;
  color: #7a4a1f;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(122, 74, 31, .09);
}

.takeout-button-disabled {
  cursor: not-allowed;
  opacity: .9;
}

.takeout-area p {
  margin: 7px 0 0;
  color: var(--warm);
  font-size: 12px;
  font-weight: 750;
}

.takeout-area .takeout-note {
  max-width: 480px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}

main { padding: 28px 0 56px; }

.section-head,
.category-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-head h2,
.category-head h2 {
  margin-bottom: 0;
}

.category-panel {
  margin-top: 28px;
}

.category-head p {
  margin: 0;
  font-size: 14px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.category-tab,
.category-link {
  appearance: none;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.category-tab.is-active,
.category-link:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.articles-page h1 {
  margin-top: 14px;
}

.compact-search {
  margin: 22px 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.compact-search label {
  display: block;
  color: var(--warm);
  font-size: 13px;
  font-weight: 850;
}

.compact-search input {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.request-page {
  max-width: 860px;
}

.request-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(16px, 5vw, 28px);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.request-panel label {
  display: block;
  color: var(--warm);
  font-size: 13px;
  font-weight: 850;
}

.request-panel input,
.request-panel textarea {
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.request-panel textarea {
  min-height: 132px;
  resize: vertical;
}

.request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.request-actions button {
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 900;
}

.request-actions .button {
  min-height: 42px;
}

.request-preview {
  border: 1px solid #ead7b8;
  border-radius: 8px;
  padding: 12px;
  background: #fffaf0;
}

.request-preview[hidden] {
  display: none;
}

.request-preview pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 8px 0 0;
  color: var(--ink);
  font: inherit;
}

.tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.token {
  border: 1px solid #cfe7d8;
  border-radius: 999px;
  padding: 3px 7px;
  background: #edf8f1;
  color: #2d5f49;
  font-size: 12px;
  font-weight: 850;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.card,
.panel,
.article-card,
.callout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.article-card {
  display: grid;
  gap: 10px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.tag.warn { background: var(--yellow-soft); color: #8a5a00; }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.pink { background: var(--pink-soft); color: var(--pink); }

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 7px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.button.ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.callout {
  border-color: #99f6e4;
  background: var(--accent-soft);
  color: var(--ink);
}

.omochi-flow,
.note,
.takeout-section {
  margin-top: 28px;
}

.takeout-section {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fffaf0;
}

.takeout-copy h2 {
  margin-top: 0;
}

.takeout-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.takeout-visual img {
  width: min(150px, 42vw);
  filter: drop-shadow(0 18px 26px rgba(96, 69, 35, .16));
}

.takeout-visual .hard {
  width: min(118px, 32vw);
  opacity: .82;
}

.flow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.flow-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.step {
  display: inline-grid;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 8px;
  background: var(--warm-soft);
  color: var(--warm);
  font-weight: 900;
}

@keyframes mochi-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-4px) scale(1.018, .985); }
  68% { transform: translateY(-2px) scale(.992, 1.01); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mochi img { animation: none; }
}

.article {
  max-width: 860px;
}

.article h1 {
  font-size: 34px;
}

.article .back {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--muted);
  text-decoration: none;
}

.article-body {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 5vw, 38px);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.article-body h1 {
  margin-bottom: 18px;
}

.article-body h2 {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.article-body h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.article-body pre {
  overflow-x: auto;
  border-radius: 8px;
  padding: 16px;
  background: #111827;
  color: #f9fafb;
  line-height: 1.65;
}

.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.mochi-widget {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 40;
  width: min(360px, calc(100% - 28px));
  pointer-events: none;
}

.mochi-widget-button {
  display: grid;
  width: 76px;
  margin-left: auto;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--warm);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  pointer-events: auto;
  cursor: pointer;
}

.mochi-widget-button img {
  width: 70px;
  filter: drop-shadow(0 12px 18px rgba(96, 69, 35, .18));
  animation: mochi-breathe 3.8s ease-in-out infinite;
}

.mochi-widget-panel {
  max-height: calc(100vh - 112px);
  overflow: auto;
  margin-top: 8px;
  border: 1px solid #ead7b8;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.widget-head {
  display: grid;
  grid-template-columns: 54px 1fr 30px;
  gap: 10px;
  align-items: center;
}

.widget-head img {
  width: 54px;
}

.widget-head p {
  margin: 2px 0 0;
  font-size: 12px;
}

.widget-close {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.widget-close:hover,
.widget-close:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.mochi-widget-panel label {
  display: block;
  margin-top: 10px;
  color: var(--warm);
  font-size: 12px;
  font-weight: 850;
}

.mochi-widget-panel input {
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.widget-results {
  display: grid;
  gap: 8px;
  max-height: 310px;
  margin-top: 10px;
  overflow: auto;
}

.widget-takeout {
  display: inline-flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.answer {
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--accent-soft);
}

.prompt {
  overflow-x: auto;
  border-radius: 8px;
  padding: 16px;
  background: #111827;
  color: #f9fafb;
  line-height: 1.65;
}

.source-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
}

.table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #eef1ec;
  color: var(--ink);
}

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

footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 720px) {
  .wrap {
    width: min(1120px, calc(100% - 40px));
  }

  .hero {
    padding: 58px 0 48px;
  }

  .hero-omochi {
    gap: 20px;
  }

  .hero-inner {
    gap: 20px;
  }

  .hero-advisor {
    max-width: 720px;
  }

  .hero-mochi {
    width: 300px;
    margin-bottom: -26px;
  }

  .hero-mochi img {
    width: 230px;
  }

  .hero-consult {
    padding: 36px 18px 18px;
  }

  .consult-row {
    grid-template-columns: minmax(0, 1fr) 160px;
  }

  .takeout-button {
    width: auto;
    min-width: 220px;
  }

  h1 {
    font-size: 56px;
  }

  .lead {
    font-size: 17px;
  }

  .flow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .takeout-section {
    grid-template-columns: 1fr 320px;
    align-items: center;
  }

  .article h1 {
    font-size: 48px;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0;
  }

  .topbar nav {
    width: 100%;
  }

  .topbar nav a {
    flex: 1 1 120px;
    justify-content: center;
  }

  .hero-copy,
  .lead,
  h1 {
    max-width: 100%;
    word-break: break-all;
  }

  h1 {
    font-size: 38px;
  }

  .mobile-break {
    display: inline;
  }

  .hero-consult {
    width: min(100%, calc(100vw - 28px));
  }

  .section-head,
  .category-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .mochi-widget {
    right: 10px;
    bottom: 10px;
    width: min(340px, calc(100% - 20px));
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 34px;
  }
}
