:root {
  color-scheme: light;
  --bg: #f6f4ee;
  --panel: #fffdf8;
  --ink: #1d2522;
  --muted: #66736d;
  --line: #ded7c9;
  --accent: #176f65;
  --accent-dark: #0f514a;
  --accent-soft: #dcefe9;
  --warning: #a75f2b;
  --gold: #d99b45;
  --shadow: 0 18px 42px rgba(41, 36, 24, 0.12);
  --shadow-strong: 0 28px 68px rgba(32, 42, 38, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(23, 111, 101, 0.08), rgba(167, 95, 43, 0.08)),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Yu Gothic UI", sans-serif;
  letter-spacing: 0;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(222, 215, 201, 0.88);
  background: rgba(246, 244, 238, 0.92);
  backdrop-filter: blur(16px);
  padding: 12px 18px;
}

.brand {
  display: grid;
  gap: 1px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.brand small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

nav a {
  color: #35413d;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-view .hero,
.app-view .feature-strip,
.app-view .story-section,
.app-view .usecase-section,
.app-view .pricing,
.app-view .faq-section {
  display: none;
}

.app-view .app-header {
  padding-top: 40px;
}

.app-view nav a[href="#pricing"],
.app-view nav a[href="#faq"] {
  display: none;
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(246, 244, 238, 0.92) 0%, rgba(246, 244, 238, 0.72) 58%, rgba(220, 239, 233, 0.72) 100%),
    repeating-linear-gradient(90deg, rgba(23, 111, 101, 0.11) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(167, 95, 43, 0.08) 0 1px, transparent 1px 72px);
}

.hero::after {
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(23, 111, 101, 0.18);
  border-radius: 50%;
  content: "";
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 18px 42px;
}

.hero h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 5.35rem);
  line-height: 1.02;
}

.hero h1 span {
  display: block;
}

.hero-copy {
  max-width: 650px;
  margin: 18px 0 0;
  color: #42504b;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
}

.primary-link {
  background: var(--accent);
  color: white;
  box-shadow: 0 14px 28px rgba(23, 111, 101, 0.22);
}

.secondary-link {
  border: 1px solid #c7bfaf;
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink);
}

.hero-preview {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(180px, 260px);
  gap: 14px;
  align-items: end;
  max-width: 820px;
  margin-top: 34px;
}

.notice-paper {
  border: 1px solid rgba(222, 215, 201, 0.9);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow-strong);
  padding: 22px;
}

.paper-label {
  display: inline-flex;
  margin-bottom: 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 900;
}

.notice-paper h2 {
  margin-bottom: 10px;
  font-size: 1.45rem;
}

.notice-paper p {
  margin-bottom: 14px;
  color: #42504b;
  line-height: 1.75;
}

.notice-paper dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.notice-paper dl div {
  display: grid;
  grid-template-columns: 86px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.notice-paper dt,
.notice-paper dd {
  margin: 0;
  padding: 10px;
}

.notice-paper dt {
  background: #f3efe7;
  color: var(--muted);
  font-weight: 900;
}

.notice-paper dd {
  background: #fff;
  font-weight: 900;
}

.channel-stack {
  display: grid;
  gap: 9px;
}

.channel-stack span {
  display: block;
  border: 1px solid rgba(23, 111, 101, 0.18);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--accent-dark);
  box-shadow: 0 10px 24px rgba(32, 42, 38, 0.08);
  padding: 12px;
  font-weight: 900;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 10px;
  margin: 34px 0 0;
}

.hero-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
  padding: 12px;
}

.hero-metrics dt,
.hero-metrics dd {
  margin: 0;
}

.hero-metrics dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-metrics dd {
  margin-top: 4px;
  font-size: 1.2rem;
  font-weight: 900;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

.feature-strip div {
  display: grid;
  gap: 4px;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  padding: 14px;
  color: #35413d;
  font-weight: 800;
  line-height: 1.55;
}

.feature-strip strong {
  color: var(--accent-dark);
  font-size: 1.02rem;
}

.feature-strip span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.story-section,
.usecase-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 18px;
}

.story-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
}

.story-section h2,
.section-title h2 {
  max-width: 740px;
  margin-bottom: 10px;
  font-size: clamp(1.55rem, 4vw, 2.5rem);
  line-height: 1.2;
}

.story-grid {
  display: grid;
  gap: 12px;
}

.story-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.88);
  padding: 16px;
}

.story-grid span {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
}

.story-grid h3 {
  margin: 6px 0 8px;
  font-size: 1.05rem;
}

.story-grid p,
.section-title p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.usecase-section {
  border-top: 1px solid rgba(222, 215, 201, 0.78);
  border-bottom: 1px solid rgba(222, 215, 201, 0.78);
}

.section-title {
  display: grid;
  gap: 2px;
  margin-bottom: 18px;
}

.usecase-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.usecase-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: #35413d;
  padding: 10px 13px;
  font-weight: 800;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 18px 18px;
}

.app-header h2 {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2.3rem);
}

.app-lead {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.app-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-badge {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--accent-dark);
  padding: 9px 12px;
  font-size: 0.88rem;
  font-weight: 900;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 0.84rem;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 6vw, 3rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px 36px;
}

.panel {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.trial-gate {
  margin: 20px 20px 0;
  border: 1px solid #c8b786;
  border-radius: 8px;
  background: #fff8e9;
  padding: 16px;
}

.trial-gate[hidden] {
  display: none;
}

.trial-gate h2 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.trial-gate p {
  margin-bottom: 0;
  color: #6d5630;
  line-height: 1.65;
}

.login-state {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  border: 1px solid rgba(64, 121, 88, 0.22);
  border-radius: 8px;
  background: #f2f8f0;
  color: #24543c;
  padding: 12px 14px;
}

.login-state[hidden] {
  display: none;
}

.login-state span {
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
}

.login-state strong {
  overflow-wrap: anywhere;
  font-size: 0.94rem;
}

.email-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.email-form[hidden] {
  display: none;
}

.next-step {
  display: grid;
  gap: 8px;
  margin: 16px 20px 0;
  border: 2px solid rgba(23, 111, 101, 0.24);
  border-radius: 8px;
  background: #f2f8f0;
  padding: 16px;
}

.next-step span {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
}

.next-step strong {
  font-size: 1.12rem;
}

.next-step p {
  margin: 0;
  color: #52645d;
  line-height: 1.65;
}

.next-step.is-upgrade {
  border-color: rgba(167, 95, 43, 0.45);
  background: #fff8e9;
}

.next-step.is-upgrade span,
.next-step.is-upgrade strong {
  color: #6d3c14;
}

.section-head {
  padding: 20px 20px 4px;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.output-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 20px 20px;
}

label {
  display: grid;
  gap: 7px;
  color: #35413d;
  font-size: 0.86rem;
  font-weight: 700;
}

.wide,
.price-row {
  grid-column: 1 / -1;
}

.price-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfc8ba;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  min-height: 96px;
  line-height: 1.65;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 111, 101, 0.16);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 16px 20px 0;
}

.tab,
.primary-button,
.secondary-button,
.icon-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.tab {
  min-height: 42px;
  background: #ece6d9;
  color: #35413d;
}

.tab.active {
  background: var(--accent);
  color: white;
}

.primary-button {
  min-height: 42px;
  white-space: nowrap;
  background: var(--accent);
  color: white;
  padding: 0 16px;
}

.primary-button.small {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.secondary-button.small {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.primary-button.full {
  width: 100%;
}

.secondary-button {
  min-height: 38px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 0 14px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  background: var(--panel);
  color: var(--accent-dark);
  box-shadow: 0 8px 22px rgba(41, 36, 24, 0.1);
}

.output-card {
  position: relative;
  margin: 16px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.text-watermark {
  display: none;
  position: absolute;
  inset: 54px 0 0;
  z-index: 1;
  align-items: center;
  justify-content: center;
  transform: rotate(-18deg);
  color: rgba(167, 95, 43, 0.18);
  font-size: clamp(1.6rem, 4vw, 3.1rem);
  font-weight: 900;
  line-height: 1.35;
  pointer-events: none;
  text-align: center;
}

.output-card.is-trial .text-watermark {
  display: flex;
}

.output-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px 8px 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

#outputText {
  position: relative;
  z-index: 0;
  min-height: 432px;
  border: 0;
  border-radius: 0;
  padding: 16px;
}

#outputText.locked {
  background:
    linear-gradient(rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.68)),
    #fff;
}

.limit-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  margin: 14px 20px 0;
  border: 1px solid #dfb06d;
  border-radius: 8px;
  background: #fff5df;
  padding: 12px;
  color: #4f3a19;
}

.limit-banner[hidden] {
  display: none;
}

.trial-notice {
  margin: 14px 20px 0;
  border: 1px solid #dfb06d;
  border-radius: 8px;
  background: #fff8e9;
  color: #6d5630;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.55;
}

.trial-notice[hidden] {
  display: none;
}

.limit-banner span {
  color: #6d5630;
  font-size: 0.9rem;
}

.limit-banner button {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.pricing,
.faq-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 18px;
}

.pricing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 18px;
  align-items: start;
}

.pricing-copy h2,
.faq-section h2 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.18;
}

.pricing-copy p,
.faq-section p {
  color: var(--muted);
  line-height: 1.75;
}

.price-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 20px;
}

.plan-name {
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-weight: 900;
}

.price {
  margin-bottom: 14px;
  font-size: 2.7rem;
  font-weight: 900;
  line-height: 1;
}

.price-note {
  margin-bottom: 16px;
  border: 1px solid #c8b786;
  border-radius: 8px;
  background: #fff8e9;
  color: #6d5630;
  padding: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.55;
}

.price span {
  color: var(--muted);
  font-size: 1rem;
}

.price-card ul {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding-left: 1.2rem;
  color: #35413d;
  font-weight: 700;
}

.fine-print {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

details p {
  margin: 10px 0 0;
  font-size: 0.92rem;
}

.success-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 18px;
}

.success-box {
  max-width: 640px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 30px;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-shell {
  display: grid;
  width: min(480px, 100%);
  gap: 18px;
}

.login-brand {
  justify-self: start;
}

.login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow-strong);
  padding: 28px;
}

.login-card h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1.05;
}

.login-card p {
  color: var(--muted);
  line-height: 1.75;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.login-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}

.login-links a,
.text-button {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 900;
  padding: 0;
  text-decoration: none;
}

.text-button {
  min-height: auto;
}

.print-sheet {
  display: none;
  position: relative;
  overflow: hidden;
  max-width: 760px;
  margin: 24px auto;
  padding: 42px;
  background: white;
  color: #1d2522;
}

.print-watermark {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  align-items: center;
  justify-content: center;
  transform: rotate(-24deg);
  color: rgba(167, 95, 43, 0.16);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.45;
  pointer-events: none;
  text-align: center;
  white-space: pre-wrap;
}

.print-sheet.is-trial .print-watermark {
  display: flex;
}

.print-sheet > :not(.print-watermark) {
  position: relative;
  z-index: 1;
}

.print-kicker {
  color: var(--warning);
  font-weight: 800;
}

.print-sheet h2 {
  font-size: 2rem;
}

.print-sheet p {
  line-height: 1.9;
}

.print-sheet table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
}

.print-sheet th,
.print-sheet td {
  border: 1px solid #bab0a0;
  padding: 14px;
  text-align: left;
}

.print-sheet th {
  width: 28%;
  background: #f3efe7;
}

.print-sign {
  text-align: right;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  transform: translateY(120%);
  border-radius: 8px;
  background: #1d2522;
  color: white;
  padding: 12px 14px;
  font-size: 0.9rem;
  opacity: 0;
  transition: 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  .site-header .primary-button {
    width: 100%;
  }

  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .feature-strip,
  .pricing,
  .faq-grid,
  .email-form,
  .story-section,
  .hero-preview {
    grid-template-columns: 1fr;
  }

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

  .app-header,
  .app-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .output-head {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .hero-inner {
    padding-top: 42px;
  }

  .hero h1 {
    font-size: 2.72rem;
  }

  .notice-paper {
    padding: 16px;
  }

  .channel-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  nav a {
    font-size: 0.84rem;
  }

  .app-header {
    padding-top: 22px;
  }

  .form-grid,
  .price-row {
    grid-template-columns: 1fr;
  }

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

  .section-head,
  .form-grid,
  .tabs {
    padding-left: 14px;
    padding-right: 14px;
  }

  .output-card {
    margin-left: 14px;
    margin-right: 14px;
  }

  #outputText {
    min-height: 380px;
  }

  .limit-banner {
    grid-template-columns: 1fr;
  }

  .limit-banner button {
    grid-row: auto;
    grid-column: auto;
    width: 100%;
  }
}

@media print {
  body {
    background: white;
  }

  .app-header,
  .app-shell,
  .site-header,
  .hero,
  .feature-strip,
  .pricing,
  .faq-section,
  .toast {
    display: none !important;
  }

  .print-sheet {
    display: block;
    margin: 0;
    max-width: none;
    min-height: 100vh;
    box-shadow: none;
  }
}
