:root {
  color-scheme: light;
  --paper: #f4efe7;
  --paper-strong: #fffdf9;
  --ink: #1f3033;
  --ink-soft: rgba(31, 48, 51, 0.72);
  --ink-muted: rgba(31, 48, 51, 0.56);
  --line: rgba(31, 48, 51, 0.13);
  --line-strong: rgba(31, 48, 51, 0.24);
  --sage: #d4ded5;
  --sage-strong: #b9cbbd;
  --wash: #eef3ee;
  --accent: #314e47;
  --copper: #8d5d3d;
  --blue: #3c5864;
  --shadow: 0 20px 44px rgba(31, 48, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    linear-gradient(180deg, #fbfaf7 0%, #f5f1e9 42%, #e8dfd2 100%);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

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

a {
  color: inherit;
}

.app-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 36px;
}

.hero {
  padding: 16px 0 32px;
}

.hero-layout {
  max-width: 840px;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
}

.tool-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  font-family: Arial, Helvetica, sans-serif;
}

.tool-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(31, 48, 51, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.tool-nav a[aria-current="page"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper-strong);
}

.tool-nav a:hover,
.tool-nav a:focus-visible {
  border-color: rgba(49, 78, 71, 0.5);
  color: var(--ink);
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--ink-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow {
  margin-top: 22px;
}

h1,
h2,
h3,
strong {
  color: var(--ink);
}

h1 {
  max-width: 760px;
  margin: 8px 0 10px;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 6px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy,
.privacy-copy,
.field-note,
.estimate-copy,
.summary-content,
.factor-list,
.notice-panel p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.58;
}

.hero-copy {
  max-width: 780px;
  margin: 14px 0 0;
  font-size: 20px;
}

.hero-invite {
  max-width: 660px;
  margin: 16px 0 0;
  color: var(--ink-muted);
  font-size: 17px;
  line-height: 1.55;
}

.hero-path {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(220px, 320px);
  gap: 12px;
  margin-top: 24px;
}

.hero-start,
.hero-process {
  display: grid;
  gap: 5px;
  align-content: center;
  min-height: 76px;
  padding: 15px 17px;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.hero-start {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fffdf9;
  box-shadow: 0 16px 30px rgba(31, 48, 51, 0.14);
}

.hero-process {
  border: 1px solid rgba(31, 48, 51, 0.18);
  background: rgba(255, 253, 249, 0.66);
  color: var(--ink);
  appearance: none;
}

.hero-start span,
.hero-process span {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.hero-start small,
.hero-process small {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.hero-start small {
  color: rgba(255, 253, 249, 0.76);
}

.hero-process small {
  color: var(--ink-muted);
}

.hero-start:hover,
.hero-start:focus-visible,
.hero-process:hover,
.hero-process:focus-visible {
  outline: 3px solid rgba(60, 88, 100, 0.18);
  outline-offset: 2px;
  transform: translateY(-1px);
}

.info-dialog {
  width: min(720px, calc(100% - 32px));
  padding: 0;
  border: 1px solid rgba(31, 48, 51, 0.18);
  border-radius: 14px;
  background: transparent;
  box-shadow: 0 24px 70px rgba(31, 48, 51, 0.24);
}

.info-dialog::backdrop {
  background: rgba(31, 48, 51, 0.28);
}

.info-dialog__content {
  position: relative;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(244, 239, 231, 0.98)),
    var(--paper-strong);
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(31, 48, 51, 0.18);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.9);
  color: var(--ink-soft);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.dialog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.dialog-grid article {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.dialog-grid h3 {
  font-size: 20px;
}

.dialog-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}

.workspace {
  padding: 30px;
  border: 1px solid rgba(31, 48, 51, 0.16);
  border-top: 5px solid var(--accent);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(250, 248, 243, 0.93)),
    var(--paper-strong);
  box-shadow: var(--shadow);
}

.scope-intro {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 8px 0 28px;
}

.scope-intro article {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.scope-intro h2 {
  margin: 0 0 9px;
  font-size: 25px;
}

.scope-intro p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.56;
}

.workspace-header {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 0 0 22px;
  border-bottom: 1px solid rgba(31, 48, 51, 0.14);
}

.privacy-copy {
  max-width: 400px;
  margin: 0;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(360px, 500px) minmax(0, 1fr);
  gap: 28px;
  margin-top: 24px;
}

.controls-pane,
.preview-pane {
  min-width: 0;
}

.stack-block {
  padding: 20px;
  border: 1px solid rgba(31, 48, 51, 0.13);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.78);
}

.stack-block:nth-of-type(1) {
  background:
    linear-gradient(135deg, rgba(212, 222, 213, 0.42), rgba(255, 253, 249, 0.86));
}

.stack-block:nth-of-type(2) {
  background:
    linear-gradient(135deg, rgba(60, 88, 100, 0.1), rgba(255, 253, 249, 0.9));
}

.stack-block:nth-of-type(3) {
  background:
    linear-gradient(135deg, rgba(141, 93, 61, 0.11), rgba(255, 253, 249, 0.92));
}

.stack-block + .stack-block {
  margin-top: 16px;
}

.stack-block h3 {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(31, 48, 51, 0.12);
}

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

.field {
  display: grid;
  gap: 8px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field span,
.check-list legend,
.estimate-stats span {
  color: rgba(31, 48, 51, 0.66);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid rgba(31, 48, 51, 0.27);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.96);
  color: var(--ink);
  font-size: 16px;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.field small {
  color: var(--ink-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.4;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.toggle input:focus-visible,
.copy-button:focus-visible,
.send-button:focus-visible {
  outline: 3px solid rgba(60, 88, 100, 0.24);
  outline-offset: 2px;
}

.choice-guide {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid rgba(49, 78, 71, 0.2);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: rgba(238, 243, 238, 0.76);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.48;
}

.choice-guide strong {
  font-size: 16px;
  line-height: 1.24;
}

.choice-guide span {
  display: block;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.check-list legend {
  margin-bottom: 2px;
}

.details-field {
  margin-top: 18px;
}

.toggle {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(31, 48, 51, 0.14);
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.74);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.45;
}

.toggle input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.preview-pane {
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 18px;
}

.estimate-panel,
.summary-panel,
.notice-panel {
  padding: 22px;
  border: 1px solid rgba(31, 48, 51, 0.14);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.86);
}

.estimate-panel {
  background:
    linear-gradient(135deg, rgba(49, 78, 71, 0.12), rgba(141, 93, 61, 0.1)),
    rgba(255, 253, 249, 0.96);
  border-color: rgba(49, 78, 71, 0.26);
}

.estimate-total {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 600;
  line-height: 0.98;
}

.estimate-copy {
  margin: 12px 0 0;
}

.estimate-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.estimate-stats div {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.78);
}

.estimate-stats strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
  line-height: 1.1;
}

.summary-content {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 4px solid rgba(49, 78, 71, 0.3);
}

.summary-content strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

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

.factor-list span {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(31, 48, 51, 0.12);
  border-radius: 9px;
  background: rgba(238, 243, 238, 0.5);
}

.details-preview {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(60, 88, 100, 0.18);
  border-radius: 9px;
  background: rgba(220, 229, 221, 0.18);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.48;
}

.details-preview strong {
  display: block;
  margin-bottom: 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.is-hidden {
  display: none !important;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.copy-button,
.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}

.copy-button {
  border: 1px solid rgba(31, 48, 51, 0.28);
  background: #fffdf9;
  color: var(--ink);
}

.send-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fffdf9;
}

.field-note {
  min-height: 1.4em;
  margin: 10px 0 0;
  font-size: 14px;
}

.notice-panel h3 {
  margin-bottom: 8px;
}

.notice-panel p {
  margin: 0;
}

@media (max-width: 960px) {
  .workspace-header,
  .workspace-grid,
  .scope-intro,
  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .workspace-header {
    display: grid;
  }

  .preview-pane {
    position: static;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 20px 14px 28px;
  }

  .workspace {
    padding: 18px;
    border-radius: 12px;
  }

  .stack-block {
    padding: 16px;
  }

  .field-grid,
  .estimate-stats {
    grid-template-columns: 1fr;
  }

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

  .estimate-panel,
  .summary-panel,
  .notice-panel {
    padding: 18px;
  }
}
