/* Terrain account pages — soft, subtle, matches site */

.auth-shell {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 28px 72px;
  position: relative;
}
.auth-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 340px at 12% -10%, rgba(199, 224, 168, 0.28), transparent 55%),
    radial-gradient(620px 300px at 100% 0%, rgba(47, 107, 79, 0.06), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--line, #E3DFD2);
  border-radius: 18px;
  padding: 36px 34px 32px;
  box-shadow: 0 18px 40px -28px rgba(27, 42, 38, 0.22);
}
.auth-card h1 {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.auth-card .auth-lede {
  font-size: 15px;
  color: var(--ink-soft, #4A5A54);
  line-height: 1.55;
  margin-bottom: 26px;
}
.auth-field { margin-bottom: 16px; }
.auth-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 7px;
  color: var(--ink, #1B2A26);
}
.auth-field input {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line, #E3DFD2);
  border-radius: 11px;
  background: var(--paper, #FBFAF6);
  color: var(--ink, #1B2A26);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.auth-field input:focus {
  border-color: var(--moss, #2F6B4F);
  box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.12);
  background: #fff;
}
.auth-hint {
  font-size: 12.5px;
  color: var(--ink-soft, #4A5A54);
  margin-top: 6px;
}
.auth-error {
  display: none;
  font-size: 14px;
  color: #8B3A2F;
  background: #F8ECE9;
  border: 1px solid #E8C8C1;
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 14px;
}
.auth-error.is-visible { display: block; }
.auth-submit {
  width: 100%;
  margin-top: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 16px;
  border: none;
  border-radius: 11px;
  background: var(--moss, #2F6B4F);
  color: #fff;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.auth-submit:hover { background: var(--moss-deep, #1F4D38); transform: translateY(-1px); }
.auth-submit:disabled { opacity: 0.65; cursor: wait; transform: none; }
.auth-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft, #4A5A54);
}
.auth-foot a {
  color: var(--moss, #2F6B4F);
  font-weight: 500;
  text-decoration: none;
}
.auth-foot a:hover { text-decoration: underline; }

/* Dashboard */
.dash-head { padding: 52px 0 28px; }
.dash-head h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(30px, 4.2vw, 44px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 10px;
}
.dash-head p { font-size: 17px; color: var(--ink-soft, #4A5A54); max-width: 54ch; }
.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.dash-stat {
  background: #fff;
  border: 1px solid var(--line, #E3DFD2);
  border-radius: 16px;
  padding: 20px 22px;
}
.dash-stat .k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-soft, #4A5A54);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.dash-stat .v {
  font-family: 'Fraunces', serif;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--moss-deep, #1F4D38);
  line-height: 1;
}
.dash-stat .s { font-size: 13.5px; color: var(--ink-soft, #4A5A54); margin-top: 8px; }

.dash-panels {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  padding-bottom: 72px;
}
.dash-panel {
  background: #fff;
  border: 1px solid var(--line, #E3DFD2);
  border-radius: 16px;
  padding: 22px 24px 20px;
}
.dash-panel h2 {
  font-family: 'Fraunces', serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.dash-panel .panel-lede {
  font-size: 14px;
  color: var(--ink-soft, #4A5A54);
  margin-bottom: 16px;
}
.dash-list { display: flex; flex-direction: column; gap: 10px; }
.dash-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 12px;
  background: var(--paper, #FBFAF6);
  border: 1px solid transparent;
}
.dash-item:hover { border-color: var(--line, #E3DFD2); }
.dash-item .title {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
}
.dash-item .meta {
  font-size: 12.5px;
  color: var(--ink-soft, #4A5A54);
  margin-top: 3px;
}
.dash-status {
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 6px;
}
.st-done { background: #E8F0E0; color: #2F6B4F; }
.st-in_progress { background: #F3F1E8; color: #8B6540; }
.st-copied, .st-drafted, .st-contacted { background: #E0EBE4; color: #1F4D38; }
.dash-empty {
  font-size: 14.5px;
  color: var(--ink-soft, #4A5A54);
  padding: 18px 4px;
  line-height: 1.5;
}
.dash-empty a { color: var(--moss, #2F6B4F); font-weight: 500; text-decoration: none; }
.dash-empty a:hover { text-decoration: underline; }
.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 28px;
}
.dash-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line, #E3DFD2);
  background: #fff;
  color: var(--ink, #1B2A26);
  transition: border-color .18s, background .18s;
}
.dash-btn:hover { border-color: var(--moss, #2F6B4F); color: var(--moss, #2F6B4F); }
.dash-btn.primary {
  background: var(--moss, #2F6B4F);
  border-color: var(--moss, #2F6B4F);
  color: #fff;
}
.dash-btn.primary:hover { background: var(--moss-deep, #1F4D38); border-color: var(--moss-deep, #1F4D38); color: #fff; }
.dash-btn.ghost-danger {
  color: var(--ink-soft, #4A5A54);
  background: transparent;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.dash-btn.ghost-danger:hover { color: #8B3A2F; border-color: #E8C8C1; }

/* Subtle progress controls on content pages */
.progress-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid var(--line, #E3DFD2);
  background: #fff;
  color: var(--ink-soft, #4A5A54);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: border-color .18s, color .18s, background .18s;
}
.progress-chip:hover { border-color: var(--moss, #2F6B4F); color: var(--moss, #2F6B4F); }
.progress-chip.is-active {
  background: #E8F0E0;
  border-color: #C7E0A8;
  color: var(--moss-deep, #1F4D38);
}
.progress-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* Fluid project / lesson tracker */
.track-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line, #E3DFD2);
}
.track-rail--guest { justify-content: flex-start; border-top: none; padding-top: 8px; margin-top: 8px; }
.track-signin {
  font-size: 13px;
  font-weight: 500;
  color: var(--moss, #2F6B4F);
  text-decoration: none;
}
.track-signin:hover { text-decoration: underline; }
.track-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft, #4A5A54);
}
.track-seg {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line, #E3DFD2);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.track-opt {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--ink-soft, #4A5A54);
  cursor: pointer;
  border-right: 1px solid var(--line, #E3DFD2);
  transition: background .15s, color .15s;
}
.track-opt:last-child { border-right: none; }
.track-opt:hover { background: rgba(47, 107, 79, 0.06); color: var(--moss, #2F6B4F); }
.track-opt.is-on {
  background: #E8F0E0;
  color: var(--moss-deep, #1F4D38);
  font-weight: 600;
}
.track-opt:disabled { opacity: 0.6; cursor: wait; }
.track-opt-clear {
  color: var(--ink-soft, #4A5A54);
  font-weight: 450;
}
.track-opt-clear:hover { background: #F8ECE9; color: #8B3A2F; }

.pcard-track-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  right: auto;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(251, 250, 246, 0.92);
  border: 1px solid var(--line, #E3DFD2);
  color: var(--ink-soft, #4A5A54);
  backdrop-filter: blur(6px);
}
.pcard-track-badge[data-status="in_progress"] {
  background: rgba(247, 243, 232, 0.95);
  border-color: #E5D9BC;
  color: #8B6540;
}
.pcard-track-badge[data-status="done"] {
  background: rgba(232, 240, 224, 0.95);
  border-color: #C7E0A8;
  color: var(--moss-deep, #1F4D38);
}
.pcard[data-track-status="in_progress"] { border-color: rgba(196, 138, 58, 0.35); }
.pcard[data-track-status="done"] { border-color: rgba(47, 107, 79, 0.4); }

.track-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  z-index: 400;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink, #1B2A26);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 16px 40px -18px rgba(27, 42, 38, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
}
.track-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.track-toast--ok { background: var(--moss-deep, #1F4D38); }
.track-toast--err { background: #8B3A2F; }

.track-filter-hint {
  font-size: 13px;
  color: var(--ink-soft, #4A5A54);
  margin: -6px 0 14px;
}
.track-filter-hint a { color: var(--moss, #2F6B4F); font-weight: 500; text-decoration: none; }
.track-filter-hint a:hover { text-decoration: underline; }

.lesson-track {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(227, 223, 210, 0.9);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lesson-track .track-rail {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.lesson-pct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-soft, #4A5A54);
  margin-bottom: 8px;
}
.lesson-pct-row strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--moss-deep, #1F4D38);
}
.lesson-pct-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--paper-2, #F3F1E8);
  overflow: hidden;
}
.lesson-pct-bar span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: var(--moss, #2F6B4F);
  transition: width .25s ease;
}

.nav-account {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--ink-soft, #4A5A54) !important;
  padding: 8px 10px !important;
  border-radius: 8px;
  text-decoration: none !important;
}
.nav-account:hover { color: var(--moss, #2F6B4F) !important; background: rgba(47, 107, 79, 0.06); }
.nav-account.is-user { color: var(--moss-deep, #1F4D38) !important; }

/* —— Professional auth extras —— */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 14px;
  flex-wrap: wrap;
}
.auth-row a {
  font-size: 13.5px;
  color: var(--moss, #2F6B4F);
  font-weight: 500;
  text-decoration: none;
}
.auth-row a:hover { text-decoration: underline; }
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-soft, #4A5A54);
  line-height: 1.45;
  cursor: pointer;
  user-select: none;
}
.auth-check input {
  margin-top: 3px;
  accent-color: var(--moss, #2F6B4F);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.auth-field-error {
  display: none;
  font-size: 12.5px;
  color: #8B3A2F;
  margin-top: 6px;
}
.auth-field-error.is-visible { display: block; }
.auth-field.has-error input {
  border-color: #D4A59A;
  background: #FFFBF9;
}
.auth-pass-wrap { position: relative; }
.auth-pass-wrap input { padding-right: 72px; }
.auth-toggle-pass {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--moss, #2F6B4F);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
}
.auth-toggle-pass:hover { background: rgba(47, 107, 79, 0.08); }
.auth-strength {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 10px;
}
.auth-strength span {
  height: 4px;
  border-radius: 99px;
  background: var(--line, #E3DFD2);
  transition: background .2s;
}
.auth-strength[data-score="1"] span:nth-child(1) { background: #C45C4A; }
.auth-strength[data-score="2"] span:nth-child(-n+2) { background: #C48A3A; }
.auth-strength[data-score="3"] span:nth-child(-n+3) { background: #6B9B4A; }
.auth-strength[data-score="4"] span { background: #2F6B4F; }
.auth-strength-label {
  font-size: 12px;
  color: var(--ink-soft, #4A5A54);
  margin-top: 6px;
}
.auth-success {
  display: none;
  font-size: 14px;
  color: #1F4D38;
  background: #E8F0E0;
  border: 1px solid #C7E0A8;
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.auth-success.is-visible { display: block; }
.auth-success a { color: var(--moss, #2F6B4F); font-weight: 600; }
.auth-trust {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line, #E3DFD2);
  font-size: 12.5px;
  color: var(--ink-soft, #4A5A54);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-trust span::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--moss, #2F6B4F);
  margin-right: 8px;
  vertical-align: middle;
  opacity: 0.7;
}

/* Continue learning + account */
.dash-continue {
  background: linear-gradient(135deg, #fff 0%, #F6F8F2 100%);
  border: 1px solid var(--line, #E3DFD2);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.dash-continue .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft, #4A5A54);
  margin-bottom: 6px;
}
.dash-continue h2 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}
.dash-continue p { font-size: 14.5px; color: var(--ink-soft, #4A5A54); }
.dash-continue .dash-btn { flex-shrink: 0; }

.dash-ring-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dash-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: conic-gradient(var(--moss, #2F6B4F) calc(var(--pct, 0) * 1%), var(--paper-2, #F3F1E8) 0);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.dash-ring-inner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--moss-deep, #1F4D38);
}
.dash-item a.title-link {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}
.dash-item a.title-link:hover { color: var(--moss, #2F6B4F); text-decoration: underline; }
.dash-item .item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.dash-item .resume {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--moss, #2F6B4F);
  text-decoration: none;
}
.dash-item .resume:hover { text-decoration: underline; }
.dash-item .remove {
  border: none;
  background: transparent;
  color: var(--ink-soft, #4A5A54);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
}
.dash-item .remove:hover { color: #8B3A2F; background: #F8ECE9; }

.dash-profile-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.dash-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #E0EBE4;
  color: var(--moss-deep, #1F4D38);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.dash-submeta {
  font-size: 13.5px;
  color: var(--ink-soft, #4A5A54);
  margin-top: 2px;
}
.dash-submeta a { color: var(--moss, #2F6B4F); font-weight: 500; text-decoration: none; }
.dash-submeta a:hover { text-decoration: underline; }

.acct-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding-bottom: 72px;
}
.acct-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.acct-nav a {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft, #4A5A54);
  padding: 10px 12px;
  border-radius: 10px;
}
.acct-nav a:hover { background: rgba(47, 107, 79, 0.06); color: var(--moss, #2F6B4F); }
.acct-nav a.is-active {
  background: #E8F0E0;
  color: var(--moss-deep, #1F4D38);
}
.acct-card {
  background: #fff;
  border: 1px solid var(--line, #E3DFD2);
  border-radius: 16px;
  padding: 26px 28px;
  margin-bottom: 18px;
}
.acct-card h2 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}
.acct-card .panel-lede { margin-bottom: 20px; }
.acct-danger h2 { color: #8B3A2F; }
.acct-danger {
  border-color: #E8C8C1;
  background: #FFFBF9;
}

.dash-loading {
  padding: 48px 0;
  text-align: center;
  color: var(--ink-soft, #4A5A54);
  font-size: 15px;
}

@media (max-width: 900px) {
  .dash-grid, .dash-panels { grid-template-columns: 1fr; }
  .acct-layout { grid-template-columns: 1fr; }
  .acct-nav { flex-direction: row; flex-wrap: wrap; }
}

