/* Project Next D1.1 — corridor prototype
 * Logo colours only. No production CSS.
 */

:root {
  --sf-forest: #32643c;
  --sf-forest-deep: #243f2c;
  --sf-leaf: #78b45a;
  --sf-flow: #1e96d2;
  --sf-gold: #e4a800;
  --sf-canvas: #f3f6f1;
  --sf-canvas-2: #e7efe4;
  --sf-text: #15241b;
  --sf-muted: #5d7165;
  --sf-card: #ffffff;
  --sf-border: rgba(50, 100, 60, 0.12);
  --sf-danger: #c45c26;
  --sf-shadow: 0 18px 40px rgba(21, 36, 27, 0.10);
  --sf-shadow-soft: 0 8px 20px rgba(21, 36, 27, 0.06);
  --sf-radius: 22px;
  --sf-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sf-max: 430px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sf-font);
  color: var(--sf-text);
  background:
    radial-gradient(1200px 600px at 50% -10%, #d9ead5 0%, transparent 55%),
    linear-gradient(180deg, #dfe8dc 0%, #cfdccb 100%);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-root {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: 10px;
}

.phone {
  width: 100%;
  max-width: var(--sf-max);
  min-height: calc(100dvh - 20px);
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(680px 320px at 80% -10%, rgba(30, 150, 210, 0.10), transparent 50%),
    radial-gradient(680px 320px at 10% 0%, rgba(120, 180, 90, 0.16), transparent 45%),
    var(--sf-canvas);
  box-shadow: 0 30px 80px rgba(21, 36, 27, 0.22);
}

.proto-banner {
  flex-shrink: 0;
  z-index: 5;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 8px 12px;
  color: #eaf3e8;
  background: linear-gradient(90deg, var(--sf-forest-deep), #2f5a3c 55%, #1d5f82);
}

.proto-banner strong {
  color: #d7f0c8;
}

.screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 22px;
  overflow: hidden;
}

.screen.scrollable {
  overflow-y: auto;
}

.brand-hero {
  margin-top: 36px;
  margin-bottom: 28px;
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.brand-hero img {
  width: 118px;
  height: 118px;
  filter: drop-shadow(0 12px 24px rgba(50, 100, 60, 0.22));
}

.brand-hero h1 {
  margin: 0;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.brand-hero p {
  margin: 0;
  max-width: 28ch;
  color: var(--sf-muted);
  line-height: 1.45;
}

.h1 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.muted {
  margin: 0;
  color: var(--sf-muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.stack {
  display: grid;
  gap: 12px;
}

.stack-lg {
  display: grid;
  gap: 16px;
}

.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--sf-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.progress-track {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(50, 100, 60, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sf-forest), var(--sf-leaf));
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 650;
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 1.5px solid var(--sf-border);
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 14px;
  color: var(--sf-text);
  box-shadow: var(--sf-shadow-soft);
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(30, 150, 210, 0.35);
  border-color: var(--sf-flow);
}

.choice-list {
  display: grid;
  gap: 10px;
}

.choice {
  text-align: left;
  border-radius: 16px;
  border: 1.5px solid transparent;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--sf-shadow-soft);
  padding: 14px 16px;
  min-height: 64px;
  color: var(--sf-text);
}

.choice.selected {
  border-color: var(--sf-forest);
  background: linear-gradient(180deg, #f7fcf5, #eef7ec);
  box-shadow: 0 10px 24px rgba(50, 100, 60, 0.12);
}

.choice strong {
  display: block;
  margin-bottom: 3px;
}

.choice span {
  color: var(--sf-muted);
  font-size: 0.84rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 16px;
  border: none;
  font-weight: 650;
  letter-spacing: -0.01em;
  transition: transform 120ms ease, filter 120ms ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(180deg, #3b7346 0%, var(--sf-forest) 100%);
  box-shadow: 0 12px 24px rgba(50, 100, 60, 0.28);
}

.btn-secondary {
  width: 100%;
  color: var(--sf-forest);
  background: rgba(255, 255, 255, 0.78);
  border: 1.5px solid var(--sf-border);
}

.btn-ghost {
  width: 100%;
  min-height: 44px;
  background: transparent;
  color: var(--sf-muted);
  font-weight: 600;
}

.btn-danger {
  width: 100%;
  color: #fff;
  background: var(--sf-danger);
}

.btn-icon {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid var(--sf-border);
  background: rgba(255, 255, 255, 0.82);
  color: var(--sf-forest);
  font-weight: 700;
  box-shadow: var(--sf-shadow-soft);
  padding: 0;
}

.note {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--sf-muted);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--sf-border);
  border-radius: 14px;
  padding: 12px 14px;
}

/* Corridor shell */
.corridor-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 0 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
}

.topbar .identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar .identity img {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  box-shadow: var(--sf-shadow-soft);
}

.topbar .identity div {
  min-width: 0;
}

.topbar .eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sf-flow);
}

.topbar .name {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segment {
  margin: 0 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--sf-border);
  box-shadow: var(--sf-shadow-soft);
}

.segment button {
  border: none;
  background: transparent;
  min-height: 40px;
  border-radius: 12px;
  color: var(--sf-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.segment button.active {
  background: #fff;
  color: var(--sf-forest);
  box-shadow: 0 6px 16px rgba(50, 100, 60, 0.12);
}

.corridor-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.corridor-scroll::-webkit-scrollbar {
  display: none;
}

.pane {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  padding: 4px 18px 8px;
  overflow-y: auto;
}

.pane-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 26px;
  box-shadow: var(--sf-shadow);
  padding: 16px;
  min-height: calc(100% - 8px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(10px);
}

.pane-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.pane-label .kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sf-forest);
}

.hero-media {
  position: relative;
  height: 168px;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(36, 63, 44, 0.55), rgba(30, 150, 210, 0.35)),
    radial-gradient(circle at 30% 30%, #cfe8b8, transparent 45%),
    radial-gradient(circle at 70% 70%, #9ad0ef, transparent 40%),
    linear-gradient(180deg, #8fbf78, #457a52);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(180deg, transparent, rgba(21, 36, 27, 0.55));
}

.hero-media .caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  color: #fff;
}

.hero-media .caption strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.hero-media .caption span {
  font-size: 0.8rem;
  opacity: 0.9;
}

.intel-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.intel-chip {
  border-radius: 14px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #f7fbf5, #eef6ea);
  border: 1px solid var(--sf-border);
}

.intel-chip .lbl {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sf-muted);
  margin-bottom: 2px;
}

.intel-chip .val {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--sf-forest-deep);
}

.timeline {
  display: grid;
  gap: 0;
  position: relative;
  padding-left: 4px;
}

.tl-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  padding: 0 0 14px;
  position: relative;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: 60px;
  top: 28px;
  bottom: -2px;
  width: 2px;
  background: rgba(50, 100, 60, 0.12);
}

.tl-item:last-child::before {
  display: none;
}

.tl-item time {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--sf-flow);
  padding-top: 4px;
}

.tl-body {
  background: #fff;
  border: 1px solid var(--sf-border);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--sf-shadow-soft);
}

.tl-body strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.tl-body span {
  color: var(--sf-muted);
  font-size: 0.8rem;
}

.tl-body.fixed {
  border-color: rgba(228, 168, 0, 0.45);
  background: linear-gradient(180deg, #fffdf6, #fff);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 750;
}

.badge.soft {
  background: #e8f4ea;
  color: var(--sf-forest);
}

.badge.gold {
  background: #fff3cc;
  color: #8a6700;
}

.badge.warn {
  background: #fcefe8;
  color: var(--sf-danger);
}

.empty-rich {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  padding: 28px 10px;
}

.empty-rich .orb {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(145deg, var(--sf-leaf), var(--sf-forest));
  box-shadow: 0 16px 30px rgba(50, 100, 60, 0.25);
}

.profile-screen .hero {
  border-radius: 26px;
  padding: 18px;
  color: #fff;
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(30, 150, 210, 0.35), transparent 50%),
    linear-gradient(145deg, #2f5f3a, #243f2c 60%, #1d4d66);
  box-shadow: var(--sf-shadow);
  margin-bottom: 16px;
}

.profile-screen .hero h1 {
  margin: 8px 0 4px;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.account-list {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--sf-border);
  box-shadow: var(--sf-shadow-soft);
}

.account-list button {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  min-height: 52px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--sf-border);
  color: var(--sf-text);
  font-weight: 600;
}

.account-list button:last-child {
  border-bottom: none;
  color: var(--sf-danger);
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 36, 27, 0.45);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  z-index: 20;
}

.sheet {
  width: 100%;
  background: #fff;
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--sf-shadow);
}

.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  z-index: 30;
  text-align: center;
  color: #fff;
  background: rgba(21, 36, 27, 0.92);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.88rem;
}

.hint-swipe {
  text-align: center;
  font-size: 0.72rem;
  color: var(--sf-muted);
  font-weight: 600;
  padding: 0 18px 4px;
}

/* Mini Flow Plan entry (Past pane) — opens full plan; not the full plan itself */
.mini-plan {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
  border: 1px solid rgba(30, 150, 210, 0.22);
  background:
    linear-gradient(135deg, rgba(30, 150, 210, 0.08), rgba(120, 180, 90, 0.10)),
    #fff;
  border-radius: 18px;
  padding: 14px 14px;
  box-shadow: var(--sf-shadow-soft);
  color: var(--sf-text);
}

.mini-plan .mini-kicker {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sf-flow);
  margin-bottom: 4px;
}

.mini-plan strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.mini-plan .mini-meta {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--sf-muted);
}

.mini-plan .mini-cta {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--sf-forest);
  background: #e8f4ea;
  border-radius: 999px;
  padding: 8px 12px;
  white-space: nowrap;
}

.sheet.flow-plan-sheet {
  max-height: min(78dvh, 640px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.sheet.flow-plan-sheet .flow-plan-scroll {
  overflow-y: auto;
  min-height: 0;
  padding-right: 2px;
}

.flow-status {
  display: inline-flex;
  margin-top: 6px;
}

.tl-body.now-slot {
  border-color: rgba(50, 100, 60, 0.35);
  background: linear-gradient(180deg, #f3faf2, #fff);
}

.context-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-row {
  display: grid;
  gap: 8px;
}

.tool-row.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.tool-row.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

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

.tool-btn {
  border: 1px solid var(--sf-border);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  min-height: 58px;
  padding: 10px 8px;
  box-shadow: var(--sf-shadow-soft);
  color: var(--sf-text);
  display: grid;
  gap: 2px;
  justify-items: center;
  text-align: center;
}

.tool-btn .tool-ico {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--sf-forest);
}

.tool-btn .tool-lbl {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.tool-reason {
  font-size: 0.75rem;
  color: var(--sf-muted);
  margin: 0;
}

.ask-entry {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px dashed rgba(50, 100, 60, 0.28);
  background: rgba(255, 255, 255, 0.55);
  color: var(--sf-muted);
  font-weight: 650;
  font-size: 0.86rem;
}

.fit-pill {
  display: inline-flex;
  margin-top: 6px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 750;
}

.fit-pill.ok {
  background: #e8f4ea;
  color: var(--sf-forest);
}

.fit-pill.tight {
  background: #fff3cc;
  color: #8a6700;
}

.fit-pill.skip {
  background: #fcefe8;
  color: var(--sf-danger);
}

.sheet.tool-sheet {
  max-height: min(78dvh, 640px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.sheet.tool-sheet .tool-sheet-scroll {
  overflow-y: auto;
  min-height: 0;
}

.list-card {
  border: 1px solid var(--sf-border);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: var(--sf-shadow-soft);
  margin-bottom: 8px;
}

.list-card strong {
  display: block;
  margin-bottom: 2px;
}

.list-card span {
  color: var(--sf-muted);
  font-size: 0.82rem;
}

@media (prefers-reduced-motion: reduce) {
  .corridor-scroll {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
