:root {
  --ink: #172026;
  --muted: #65717d;
  --soft: #8a96a3;
  --line: #dce3e0;
  --panel: #ffffff;
  --bg: #f5f7f8;
  --teal: #0f766e;
  --teal-dark: #0a4f4a;
  --blue: #244f7a;
  --gold: #a76510;
  --amber-bg: #fff7e6;
  --shadow: 0 14px 36px rgba(23, 32, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  padding: 22px;
}

.top-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  align-items: end;
  min-height: 430px;
  overflow: hidden;
  padding: 34px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(8, 30, 39, 0.95), rgba(12, 65, 70, 0.72)),
    url("https://images.unsplash.com/photo-1532187863486-abf9dbad1b69?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 820px;
}

.brand-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
  font-weight: 800;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--teal-dark);
  font-size: 15px;
  letter-spacing: 0;
}

.brand-row em {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-style: normal;
}

.eyebrow {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 760;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: 54px;
  line-height: 1.06;
  letter-spacing: 0;
}

.top-band p {
  max-width: 740px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1.72;
}

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

.hero-primary,
.hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.hero-primary {
  border: 1px solid #fff;
  background: #fff;
  color: #0b3c3b;
}

.hero-secondary {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.metric-strip {
  display: grid;
  gap: 12px;
}

.metric-strip div {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.metric-strip strong {
  display: block;
  font-size: 32px;
  line-height: 1;
}

.metric-strip span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.value-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.value-row div {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.value-row strong,
.value-row span {
  display: block;
}

.value-row strong {
  font-size: 15px;
}

.value-row span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.input-panel,
.result-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 26px rgba(23, 32, 38, 0.05);
}

.input-panel {
  position: sticky;
  top: 18px;
  padding: 22px;
}

.result-panel {
  padding: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 820;
}

.panel-title button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
  color: var(--teal);
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

label {
  display: block;
  margin-bottom: 15px;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  border: 1px solid #cbd5d1;
  border-radius: 6px;
  background: #fbfcfd;
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 260px;
  padding: 12px;
  line-height: 1.58;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

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

.primary {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  font-weight: 820;
  cursor: pointer;
}

.primary:hover,
.hero-primary:hover {
  filter: brightness(0.98);
}

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

.empty-state.compact {
  min-height: 300px;
}

.empty-state h2 {
  margin: 18px 0 6px;
}

.empty-state p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.empty-visual {
  width: 190px;
  height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.18), rgba(36, 79, 122, 0.12)),
    repeating-linear-gradient(0deg, #fff, #fff 13px, #e8eee9 14px);
}

.hidden {
  display: none;
}

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

.summary-card,
.journal-card,
.upsell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-card {
  padding: 14px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.35;
}

.notice {
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid #efdaa5;
  border-radius: 8px;
  background: var(--amber-bg);
  color: #734900;
  font-size: 13px;
  line-height: 1.45;
}

.journal-list {
  display: grid;
  gap: 12px;
}

.journal-card {
  padding: 16px;
}

.journal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 16px;
}

.journal-name {
  font-size: 19px;
  font-weight: 820;
  line-height: 1.28;
}

.journal-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.score {
  text-align: right;
}

.score strong {
  display: block;
  color: var(--teal);
  font-size: 28px;
  line-height: 1;
}

.score span {
  color: var(--soft);
  font-size: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag {
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf5f2;
  color: var(--teal);
  font-size: 12px;
  font-weight: 760;
}

.tag.sprint {
  background: #fff3dd;
  color: var(--gold);
}

.tag.backup {
  background: #eef2f7;
  color: var(--blue);
}

.journal-reason {
  margin-top: 12px;
  color: #32424a;
  font-size: 13px;
  line-height: 1.55;
}

.evidence-block {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #e1e9e5;
  border-radius: 8px;
  background: #f7faf9;
}

.evidence-block strong {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
}

.work-list {
  display: grid;
  gap: 9px;
}

.work-item {
  padding: 11px;
  border: 1px solid #e5ebe7;
  border-radius: 6px;
  background: #fff;
}

.work-title {
  font-size: 13px;
  font-weight: 780;
  line-height: 1.38;
}

.work-meta,
.work-empty {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.work-item p {
  margin: 7px 0 0;
  color: #42515a;
  font-size: 13px;
  line-height: 1.45;
}

.risk-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.upsell {
  margin-top: 14px;
  padding: 16px;
  background: #102d34;
  color: #fff;
}

.upsell p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .top-band,
  .workspace,
  .value-row,
  .summary {
    grid-template-columns: 1fr;
  }

  .input-panel {
    position: static;
  }

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

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

  .top-band {
    min-height: 430px;
    padding: 22px;
  }

  h1 {
    font-size: 35px;
  }

  .form-grid,
  .metric-strip,
  .journal-head {
    grid-template-columns: 1fr;
  }

  .score {
    text-align: left;
  }
}
