:root {
  --background: #f3f0e8;
  --card: #fffdf8;
  --dark: #12332f;
  --dark-soft: #1d4943;
  --ink: #172723;
  --muted: #66736f;
  --line: #d9ddd6;
  --accent: #e89f52;
  --accent-strong: #d77f29;
  --positive: #2f7c5d;
  --negative: #a33e36;
  --shadow: 0 22px 60px rgba(23, 39, 35, 0.1);
  font-family: Tahoma, Arial, sans-serif;
  color: var(--ink);
  background: var(--background);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 15% 3%, rgba(232, 159, 82, 0.16), transparent 27rem),
    var(--background);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--card);
  background: var(--dark);
  font: 700 24px Georgia, serif;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

nav {
  display: flex;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

nav a:hover {
  color: var(--dark);
}

.hero {
  width: min(1180px, calc(100% - 40px));
  min-height: 590px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: center;
  gap: 70px;
  padding: 70px 0 100px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  color: var(--dark);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.35;
  letter-spacing: -0.04em;
}

.hero-content > p {
  max-width: 660px;
  color: var(--muted);
  font-size: 18px;
  line-height: 2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 50px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  transition: 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: white;
  background: var(--dark);
  box-shadow: 0 12px 24px rgba(18, 51, 47, 0.18);
}

.button-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.trust-list {
  margin: 34px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.trust-list li::before {
  content: "✓";
  margin-left: 7px;
  color: var(--positive);
  font-weight: 700;
}

.hero-card {
  position: relative;
  min-height: 370px;
  padding: 42px;
  overflow: hidden;
  border-radius: 32px;
  color: white;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 45%),
    var(--dark);
  box-shadow: var(--shadow);
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  bottom: -75px;
  left: -55px;
  border: 42px solid rgba(232, 159, 82, 0.62);
  border-radius: 50%;
}

.hero-card > span {
  color: rgba(255, 255, 255, 0.62);
}

.hero-card > strong {
  display: block;
  margin: 24px 0 64px;
  font-size: 42px;
}

.metric-preview {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  font-size: 14px;
}

.metric-preview i {
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
}

.calculator-section {
  padding: 95px max(20px, calc((100% - 1180px) / 2));
  background: #e7ebe5;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 44px;
}

.section-heading h2,
.method h2 {
  margin-bottom: 14px;
  color: var(--dark);
  font-size: clamp(30px, 4vw, 45px);
  line-height: 1.5;
}

.section-heading p {
  color: var(--muted);
  line-height: 1.9;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.analysis-form,
.results-panel {
  padding: 32px;
  border: 1px solid rgba(18, 51, 47, 0.08);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 14px 44px rgba(18, 51, 47, 0.06);
}

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

label span {
  display: block;
  margin-bottom: 9px;
  color: var(--dark-soft);
  font-size: 13px;
  font-weight: 700;
}

.field-help {
  min-height: 37px;
  margin: -2px 0 8px;
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.7;
}

input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: white;
  direction: ltr;
  text-align: right;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(232, 159, 82, 0.13);
}

.form-submit {
  width: 100%;
  margin-top: 24px;
}

.form-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.form-note a {
  color: var(--accent-strong);
  font-weight: 700;
}

.results-panel {
  min-height: 460px;
  position: sticky;
  top: 24px;
}

.empty-state {
  min-height: 390px;
  display: grid;
  place-content: center;
  text-align: center;
}

.empty-icon {
  width: 66px;
  height: 66px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: var(--accent-strong);
  background: rgba(232, 159, 82, 0.15);
  font-size: 30px;
}

.empty-state p {
  color: var(--muted);
}

.result-summary {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.result-summary span {
  color: var(--muted);
  font-size: 12px;
}

.result-summary strong {
  display: block;
  margin: 8px 0;
  color: var(--dark);
  font-size: 26px;
}

.result-summary p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

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

.results-grid article {
  padding: 16px;
  border-radius: 15px;
  background: #f3f5f1;
}

.results-grid span {
  color: var(--muted);
  font-size: 11px;
}

.results-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--dark);
  font-size: 17px;
  direction: ltr;
  text-align: right;
}

.cash-flow-chart {
  margin-top: 26px;
}

.cash-flow-chart h3 {
  font-size: 14px;
}

#cash-flow-bars {
  min-height: 120px;
  display: flex;
  direction: ltr;
  align-items: flex-end;
  gap: 8px;
}

.bar-column {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.bar {
  width: min(36px, 100%);
  min-height: 4px;
  border-radius: 7px 7px 2px 2px;
  background: var(--positive);
}

.bar.negative {
  background: var(--negative);
}

.warnings {
  margin-top: 20px;
  padding: 14px;
  border-radius: 12px;
  color: #6c4a16;
  background: #fff2d5;
  font-size: 12px;
  line-height: 1.8;
}

.features {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 110px 0;
}

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

.feature-grid article {
  min-height: 230px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.38);
}

.feature-grid article > span {
  color: var(--accent-strong);
  font-weight: 700;
}

.feature-grid h3 {
  margin-top: 48px;
  color: var(--dark);
}

.feature-grid p {
  color: var(--muted);
  line-height: 1.9;
}

.method {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 90px;
  padding: 54px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  border-radius: 28px;
  color: white;
  background: var(--dark);
}

.method h2 {
  margin-bottom: 0;
  color: white;
}

.method p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 2;
}

footer {
  min-height: 90px;
  padding: 20px max(20px, calc((100% - 1180px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.guide-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.guide-hero {
  min-height: 560px;
  padding: 70px 0 100px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(310px, 0.85fr);
  align-items: center;
  gap: 70px;
}

.guide-hero h1 {
  font-size: clamp(40px, 5vw, 66px);
}

.guide-hero > div > p {
  max-width: 700px;
  color: var(--muted);
  font-size: 17px;
  line-height: 2;
}

.guide-rule {
  padding: 34px;
  border-radius: 28px;
  color: white;
  background: var(--dark);
  box-shadow: var(--shadow);
}

.guide-rule > strong {
  font-size: 24px;
}

.guide-rule > p {
  margin: 14px 0 28px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.9;
}

.guide-rule div {
  margin-top: 12px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.guide-rule div span,
.guide-rule div code {
  display: block;
}

.guide-rule div span {
  margin-bottom: 7px;
  color: #87d8ad;
  font-size: 11px;
}

.guide-rule div.wrong span {
  color: #f5a59e;
}

.guide-rule code {
  font-family: Tahoma, Arial, sans-serif;
  direction: rtl;
}

.guide-section {
  padding: 95px 0;
  border-top: 1px solid var(--line);
}

.guide-start {
  border-top: 0;
}

.guide-card-grid,
.result-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.guide-card-grid article,
.result-guide-grid article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.46);
}

.step-number,
.result-guide-grid article > span {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--accent-strong);
  background: rgba(232, 159, 82, 0.14);
  font-weight: 700;
}

.guide-card-grid h3,
.result-guide-grid h3 {
  margin-top: 30px;
  color: var(--dark);
}

.guide-card-grid p,
.result-guide-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.9;
}

.input-guide-list {
  display: grid;
  gap: 16px;
}

.input-guide-list article {
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 40px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}

.input-guide-title {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.input-guide-title > span {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--dark);
  font-weight: 700;
}

.input-guide-title h3 {
  margin-bottom: 8px;
  color: var(--dark);
}

.input-guide-title p,
.input-guide-list article > p,
.input-guide-list li {
  color: var(--muted);
  line-height: 1.9;
}

.input-guide-list ul {
  margin: 0;
  padding-right: 24px;
}

.input-guide-list .formula {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px 18px;
  border-radius: 12px;
  color: var(--dark-soft);
  background: #edf2ec;
}

.example-section {
  width: 100vw;
  margin-right: calc((100vw - min(1180px, calc(100vw - 40px))) / -2);
  padding-right: max(20px, calc((100vw - 1180px) / 2));
  padding-left: max(20px, calc((100vw - 1180px) / 2));
  background: #e7ebe5;
}

.example-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr);
  gap: 24px;
}

.example-table,
.example-notes {
  padding: 30px;
  border-radius: 22px;
  background: var(--card);
}

.example-table div {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.example-table div:last-child {
  border-bottom: 0;
}

.example-table span {
  color: var(--muted);
}

.example-table strong {
  color: var(--dark);
  direction: ltr;
}

.example-notes {
  color: white;
  background: var(--dark);
}

.example-notes h3 {
  font-size: 22px;
}

.example-notes ol {
  margin: 20px 0 30px;
  padding-right: 20px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 2;
}

.example-notes .button {
  color: var(--dark);
  background: var(--accent);
}

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

.mistakes-list p {
  margin: 0;
  padding: 20px;
  border-right: 4px solid var(--accent);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.46);
  line-height: 1.9;
}

.mistakes-list strong {
  color: var(--dark);
}

.guide-cta {
  margin: 30px 0 90px;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-radius: 28px;
  color: white;
  background: var(--dark);
}

.guide-cta h2 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: clamp(27px, 4vw, 42px);
  line-height: 1.6;
}

.guide-cta .button {
  flex: 0 0 auto;
  color: var(--dark);
  background: var(--accent);
}

.account-body,
.dashboard-body {
  min-height: 100vh;
}

.account-page {
  width: min(1050px, calc(100% - 40px));
  min-height: calc(100vh - 90px);
  margin: 0 auto;
  padding: 70px 0 100px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.75fr);
  align-items: center;
  gap: 80px;
}

.account-intro h1,
.pricing-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
}

.account-intro > p,
.pricing-hero > p {
  color: var(--muted);
  line-height: 2;
}

.account-intro ul {
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
}

.account-intro li::before {
  content: "✓";
  margin-left: 10px;
  color: var(--positive);
  font-weight: 700;
}

.auth-card {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.auth-tabs {
  margin-bottom: 28px;
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  border-radius: 13px;
  background: #edf0eb;
}

.auth-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.auth-tabs button.active {
  color: var(--dark);
  background: white;
  box-shadow: 0 6px 18px rgba(18, 51, 47, 0.08);
  font-weight: 700;
}

.auth-card form {
  display: grid;
  gap: 18px;
}

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

.site-support {
  grid-column: 1 / -1;
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.project-analysis-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.project-analysis-result {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.auth-card .button {
  width: 100%;
  margin-top: 6px;
}

.auth-message {
  min-height: 22px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.auth-message.error {
  color: var(--negative);
}

.dashboard-header {
  min-height: 82px;
  padding: 0 max(24px, calc((100% - 1280px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.78);
}

.dashboard-user {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--dark);
  font-size: 13px;
}

.text-button,
.dialog-close {
  border: 0;
  cursor: pointer;
  color: var(--negative);
  background: transparent;
}

.dashboard-layout {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0 90px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: start;
}

.dashboard-sidebar {
  position: sticky;
  top: 24px;
  padding: 28px;
  border-radius: 22px;
  color: white;
  background: var(--dark);
}

.dashboard-sidebar h1 {
  margin-bottom: 10px;
  color: white;
  font-size: 30px;
}

.dashboard-sidebar p {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.9;
}

.dashboard-sidebar .button {
  width: 100%;
  margin-top: 12px;
}

.dashboard-sidebar .button-primary {
  color: var(--dark);
  background: var(--accent);
}

.dashboard-sidebar .button-secondary {
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.dashboard-section-heading {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-section-heading h2 {
  margin-bottom: 0;
  color: var(--dark);
  font-size: 34px;
}

.dashboard-section-heading > span {
  color: var(--muted);
  font-size: 12px;
}

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

.dashboard-empty {
  grid-column: 1 / -1;
  min-height: 240px;
  margin: 0;
  display: grid;
  place-items: center;
  border: 1px dashed #b9c1ba;
  border-radius: 20px;
  color: var(--muted);
}

.project-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(18, 51, 47, 0.05);
}

.project-card > div > span {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
}

.project-card h3 {
  margin: 10px 0 6px;
  color: var(--dark);
  font-size: 20px;
}

.project-card p {
  color: var(--muted);
  font-size: 11px;
}

.project-card dl {
  margin: 22px 0;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-radius: 14px;
  background: #f0f3ee;
}

.project-card dl div {
  min-width: 0;
}

.project-card dt {
  color: var(--muted);
  font-size: 10px;
}

.project-card dd {
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--dark);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card .button {
  width: 100%;
}

.scenario-comparison {
  margin: 0 0 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scenario-item {
  min-width: 0;
  padding: 10px;
  border-radius: 11px;
  text-align: center;
  background: #edf0eb;
}

.scenario-item span,
.scenario-item strong,
.scenario-item small {
  display: block;
}

.scenario-item span {
  color: var(--muted);
  font-size: 9px;
}

.scenario-item strong {
  margin: 6px 0 3px;
  overflow: hidden;
  color: var(--dark);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-item small {
  color: var(--muted);
  font-size: 8px;
}

.scenario-item.pessimistic {
  background: #f7e5e2;
}

.scenario-item.optimistic {
  background: #e2f1e8;
}

.project-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.project-dialog::backdrop {
  background: rgba(9, 29, 26, 0.68);
  backdrop-filter: blur(4px);
}

.project-dialog form {
  padding: 30px;
}

.dialog-heading {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dialog-heading h2 {
  margin-bottom: 0;
  color: var(--dark);
}

.dialog-close {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--muted);
  background: #edf0eb;
  font-size: 26px;
}

.full-field {
  display: block;
  margin-bottom: 20px;
}

.scenario-settings {
  margin: 24px 0 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.form-section {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
}

.form-section summary {
  padding: 18px 20px;
  cursor: pointer;
  color: var(--dark);
  font-weight: 700;
}

.form-section[open] summary {
  border-bottom: 1px solid var(--line);
}

.form-section > p {
  margin: 18px 20px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.form-section > .form-grid {
  padding: 20px;
}

.detail-editor {
  padding: 20px 20px 0;
  display: grid;
  gap: 12px;
}

.detail-row {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8f4;
}

.bom-editor {
  padding: 20px 20px 0;
  display: grid;
  gap: 12px;
}

.bom-row {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1.2fr)) repeat(2, minmax(110px, 0.8fr)) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8f4;
}

.bom-row select,
.bom-row input {
  width: 100%;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.detail-row label span {
  font-size: 10px;
}

.detail-row input {
  height: 42px;
}

.detail-add-button,
.detail-remove-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.detail-add-button {
  margin: 14px 20px 20px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--dark);
  background: rgba(232, 159, 82, 0.16);
  font-size: 11px;
  font-weight: 700;
}

.detail-remove-button {
  height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--negative);
  background: #f7e5e2;
  font-size: 10px;
}

.construction-editor {
  padding: 20px 20px 0;
  display: grid;
  gap: 10px;
}

.construction-row {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(130px, 0.7fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8f4;
}

.construction-row input {
  height: 42px;
}

.construction-actions {
  padding: 0 20px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.construction-actions .detail-add-button {
  margin-right: 0;
  margin-left: 0;
  margin-bottom: 0;
}

#construction-total {
  color: var(--positive);
  font-size: 12px;
}

#construction-total.invalid {
  color: var(--negative);
}

.advanced-indicators {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.construction-summary {
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.construction-summary > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--dark);
  font-size: 11px;
}

.construction-summary div {
  padding: 7px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.construction-summary span,
.construction-summary small {
  color: var(--muted);
  font-size: 9px;
}

.composition-indicators {
  margin-bottom: 18px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-radius: 12px;
  background: #f5efe4;
}

.composition-indicators span,
.composition-indicators strong {
  display: block;
}

.resource-breakdown {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.resource-breakdown summary {
  padding: 12px;
  cursor: pointer;
  color: var(--dark);
  font-size: 10px;
  font-weight: 700;
}

.resource-breakdown > div {
  padding: 12px;
  border-top: 1px solid var(--line);
}

.resource-breakdown strong {
  display: block;
  margin: 8px 0;
  color: var(--dark);
  font-size: 10px;
}

.resource-breakdown p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.composition-indicators span {
  color: var(--muted);
  font-size: 9px;
}

.composition-indicators strong {
  margin-top: 4px;
  color: var(--dark);
  font-size: 12px;
}

.advanced-indicators div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.advanced-indicators span,
.advanced-indicators strong {
  display: block;
}

.advanced-indicators span {
  color: var(--muted);
  font-size: 9px;
}

.advanced-indicators strong {
  margin-top: 5px;
  color: var(--dark);
  font-size: 12px;
}

.projection-details {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.projection-details summary {
  padding: 12px 14px;
  cursor: pointer;
  color: var(--dark);
  font-size: 11px;
  font-weight: 700;
}

.projection-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.projection-details table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 10px;
}

.projection-details th,
.projection-details td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.projection-details th {
  color: var(--muted);
  background: #f0f3ee;
}

.scenario-settings legend {
  padding: 0 8px;
  color: var(--dark);
  font-weight: 700;
}

.scenario-settings > p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.pricing-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0 100px;
}

.pricing-hero {
  max-width: 780px;
  margin: 0 auto 60px;
  text-align: center;
}

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

.pricing-grid article {
  min-height: 470px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
}

.pricing-grid .featured-plan {
  color: white;
  border-color: var(--dark);
  background: var(--dark);
  transform: translateY(-14px);
}

.plan-label {
  align-self: flex-start;
  padding: 7px 12px;
  border-radius: 20px;
  color: var(--accent-strong);
  background: rgba(232, 159, 82, 0.14);
  font-size: 11px;
  font-weight: 700;
}

.pricing-grid h2 {
  margin: 30px 0 14px;
  color: var(--dark);
}

.pricing-grid article > strong {
  font-size: 22px;
}

.pricing-grid ul {
  margin: 30px 0;
  padding-right: 20px;
  color: var(--muted);
  line-height: 2.2;
}

.pricing-grid .button {
  width: 100%;
  margin-top: auto;
}

.featured-plan h2,
.featured-plan > strong {
  color: white;
}

.featured-plan ul {
  color: rgba(255, 255, 255, 0.7);
}

.featured-plan .button {
  color: var(--dark);
  background: var(--accent);
}

.pricing-notice {
  margin: 32px auto 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

@media (max-width: 900px) {
  nav {
    display: none;
  }

  .hero,
  .workspace,
  .method,
  .guide-hero,
  .example-layout,
  .account-page,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 35px;
    padding-top: 45px;
  }

  .results-panel {
    position: static;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .guide-card-grid,
  .result-guide-grid {
    grid-template-columns: 1fr;
  }

  .input-guide-list article {
    grid-template-columns: 1fr;
  }

  .input-guide-list .formula {
    grid-column: auto;
  }

  .guide-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-sidebar {
    position: static;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid .featured-plan {
    transform: none;
  }
}

@media (max-width: 600px) {
  .site-header,
  .hero,
  .features,
  .method,
  .guide-page {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: 38px;
  }

  .hero-card {
    min-height: 320px;
    padding: 28px;
  }

  .calculator-section {
    padding-right: 14px;
    padding-left: 14px;
  }

  .analysis-form,
  .results-panel {
    padding: 20px;
  }

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

  .field-help {
    min-height: 0;
  }

  .method {
    padding: 32px;
    gap: 24px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-hero {
    padding-top: 45px;
  }

  .guide-section {
    padding: 70px 0;
  }

  .example-section {
    margin-right: -14px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .mistakes-list {
    grid-template-columns: 1fr;
  }

  .guide-cta {
    padding: 30px;
  }

  .account-page,
  .dashboard-layout,
  .pricing-page {
    width: min(100% - 28px, 1180px);
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    padding: 14px;
  }

  .dashboard-header .brand small {
    display: none;
  }

  .project-dialog form {
    padding: 20px;
  }

  .detail-row {
    grid-template-columns: 1fr;
  }

  .construction-row {
    grid-template-columns: 1fr;
  }

  .bom-row {
    grid-template-columns: 1fr;
  }

  .construction-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

.member-links{display:flex;flex-wrap:wrap;gap:16px;padding:16px;margin:16px 0;background:#eef5f1;border-radius:12px}.member-links a{text-decoration:underline}
#draft-status{padding:8px;background:#eef5f1;border-radius:8px}
@media print{.member-links{display:none!important}}
