[hidden] { display: none !important; }

.portal-shell {
  --portal-bg: #f4f7f5;
  --portal-paper: #ffffff;
  --portal-ink: #172b24;
  --portal-muted: #68766f;
  --portal-line: #dbe5df;
  --portal-green: #247a5a;
  --portal-green-dark: #14563d;
  --portal-mint: #dff3ea;
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  color: var(--portal-ink);
  background: var(--portal-bg);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.portal-shell *,
.portal-shell *::before,
.portal-shell *::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

.portal-shell button,
.portal-shell input,
.portal-shell select,
.portal-shell textarea {
  font: inherit;
}

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

.portal-shell :focus-visible {
  outline: 3px solid rgba(36, 122, 90, 0.28);
  outline-offset: 3px;
}

.portal-sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 20px;
  color: #eef7f2;
  background: #102b23;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  padding: 0 8px;
}

.portal-brand img {
  display: block;
  flex: 0 0 auto;
}

.portal-brand > span {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.05;
}

.portal-brand small {
  display: block;
  margin-top: 5px;
  color: #a9c4b7;
  font-size: 9px;
  font-weight: 500;
}

.portal-nav {
  display: grid;
  gap: 4px;
  margin-top: 40px;
}

.portal-nav p {
  margin: 24px 12px 8px;
  color: #759487;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.portal-nav a {
  min-height: 46px;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  color: #bad0c5;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 160ms, background 160ms;
}

.portal-nav a:hover,
.portal-nav a.is-active {
  color: #ffffff;
  background: rgba(97, 213, 170, 0.12);
}

.portal-nav a.is-active {
  box-shadow: inset 3px 0 0 #61d5aa;
}

.portal-nav svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.portal-nav small {
  color: #7fa194;
  font-size: 9px;
  text-transform: uppercase;
}

.portal-sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 14px;
  padding: 18px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.portal-sync {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9ab7aa;
  font-size: 11px;
}

.portal-sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #61d5aa;
  box-shadow: 0 0 0 4px rgba(97, 213, 170, 0.09);
}

.portal-signout {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  color: #c9d9d1;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.portal-signout svg {
  width: 16px;
  height: 16px;
}

.portal-main {
  min-width: 0;
  padding: 0 clamp(24px, 5vw, 72px) 70px;
}

.portal-topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--portal-line);
}

.portal-topbar p {
  margin: 0 0 3px;
  color: var(--portal-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.portal-topbar strong {
  font-size: 14px;
}

.portal-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #ffffff;
  border: 0;
  border-radius: 50%;
  background: var(--portal-green);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.portal-view {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding-top: 48px;
}

.portal-narrow {
  width: min(660px, 100%);
}

.portal-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.portal-eyebrow,
.portal-section-heading p,
.portal-form-heading .portal-eyebrow,
.portal-coming > p {
  margin: 0 0 10px;
  color: var(--portal-green);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.portal-welcome h1,
.portal-form-heading h1,
.portal-coming h1 {
  margin: 0;
  max-width: 700px;
  font-size: 42px;
  line-height: 1.12;
  font-weight: 650;
}

.portal-welcome > div > p:last-child,
.portal-form-heading > p:last-child,
.portal-coming > p:nth-of-type(2) {
  max-width: 570px;
  margin: 14px 0 0;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 1.65;
}

.portal-primary,
.portal-secondary,
.portal-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 17px;
  border-radius: 5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.portal-primary {
  color: #ffffff;
  border: 1px solid var(--portal-green);
  background: var(--portal-green);
  font-size: 12px;
  box-shadow: 0 8px 20px rgba(36, 122, 90, 0.12);
}

.portal-primary:hover {
  background: var(--portal-green-dark);
  border-color: var(--portal-green-dark);
}

.portal-secondary {
  color: var(--portal-ink);
  border: 1px solid var(--portal-line);
  background: #ffffff;
  font-size: 11px;
}

.portal-back {
  min-height: 36px;
  padding: 7px 0;
  color: var(--portal-muted);
  border: 0;
  background: transparent;
  font-size: 11px;
}

.portal-primary svg,
.portal-secondary svg,
.portal-back svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.portal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 42px;
  border: 1px solid var(--portal-line);
  border-radius: 7px;
  background: var(--portal-paper);
}

.portal-summary > div {
  padding: 20px 22px;
  border-right: 1px solid var(--portal-line);
}

.portal-summary > div:last-child {
  border-right: 0;
}

.portal-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--portal-muted);
  font-size: 10px;
}

.portal-summary strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.portal-habit-snapshot {
  margin-top: 18px;
  padding: 24px;
  color: #eef7f2;
  border-radius: 8px;
  background: #102b23;
}

.portal-habit-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.portal-habit-heading p {
  margin: 0 0 4px;
  color: #8fb3a2;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.portal-habit-heading h2 {
  margin: 0;
  font-size: 21px;
}

.portal-habit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
  border-block: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-habit-grid > div {
  padding: 17px 18px 17px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-habit-grid > div:not(:first-child) {
  padding-left: 18px;
}

.portal-habit-grid > div:last-child {
  border-right: 0;
}

.portal-habit-grid span,
.portal-habit-grid small {
  display: block;
  color: #95b4a6;
  font-size: 9px;
}

.portal-habit-grid strong {
  display: block;
  margin: 5px 0 2px;
  color: #ffffff;
  font-size: 20px;
}

.portal-next-action {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding-top: 18px;
}

.portal-next-action > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #102b23;
  border-radius: 50%;
  background: #61d5aa;
}

.portal-next-action svg {
  width: 17px;
  height: 17px;
}

.portal-next-action div {
  display: grid;
  gap: 3px;
}

.portal-next-action small {
  color: #95b4a6;
  font-size: 9px;
  text-transform: uppercase;
}

.portal-next-action strong {
  color: #ffffff;
  font-size: 12px;
  line-height: 1.5;
}

.portal-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  color: #14563d;
  border-radius: 4px;
  background: #dff3ea;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.portal-status-pill[data-tone="attention"] {
  color: #7b3f0b;
  background: #fff0d9;
}

.portal-status-pill[data-tone="setup"] {
  color: #31536d;
  background: #e2eff8;
}

.portal-status-pill[data-tone="ahead"] {
  color: #174f3b;
  background: #bfead8;
}

.portal-habit-heading .portal-status-pill {
  color: #102b23;
}

.portal-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 46px 0 19px;
}

.portal-section-heading p {
  margin-bottom: 5px;
}

.portal-section-heading h2 {
  margin: 0;
  font-size: 24px;
}

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

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

.portal-goal-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-paper);
  box-shadow: 0 12px 30px rgba(23, 43, 36, 0.05);
  cursor: pointer;
}

.portal-goal-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.portal-goal-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.portal-goal-percent {
  padding: 5px 7px;
  color: var(--portal-green-dark);
  border-radius: 4px;
  background: var(--portal-mint);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.portal-goal-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--portal-green-dark);
  border-radius: 6px;
  background: var(--portal-mint);
}

.portal-goal-icon svg {
  width: 20px;
  height: 20px;
}

.portal-goal-detail-link {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin-top: 22px;
  color: inherit;
  text-decoration: none;
}

.portal-goal-detail-link span {
  color: var(--portal-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.portal-goal-detail-link strong {
  overflow-wrap: anywhere;
  font-size: 21px;
  line-height: 1.3;
}

.portal-goal-detail-link:hover strong {
  color: var(--portal-green);
}

.portal-goal-numbers {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  margin-top: 26px;
}

.portal-goal-numbers strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.portal-goal-numbers span {
  color: var(--portal-muted);
  font-size: 10px;
}

.portal-progress {
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 4px;
  background: #e7ede9;
}

.portal-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--portal-green);
  transition: width 350ms ease;
}

.portal-goal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  color: var(--portal-muted);
  font-size: 10px;
}

.portal-goal-rhythm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 5px;
  background: #f4f8f6;
}

.portal-goal-rhythm span {
  color: var(--portal-muted);
  font-size: 9px;
}

.portal-goal-rhythm strong {
  font-size: 11px;
}

.portal-goal-actions {
  display: flex;
  gap: 9px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--portal-line);
}

.portal-goal-actions > * {
  flex: 1;
}

.portal-empty {
  min-height: 340px;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 48px 22px;
  text-align: center;
  border: 1px dashed #b7ccc1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.portal-empty-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--portal-green);
  border-radius: 50%;
  background: var(--portal-mint);
}

.portal-empty-mark svg {
  width: 24px;
  height: 24px;
}

.portal-empty > p:first-of-type {
  margin: 0 0 8px;
  color: var(--portal-green);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.portal-empty h2 {
  margin: 0;
  font-size: 27px;
}

.portal-empty > p:nth-of-type(2) {
  max-width: 520px;
  margin: 13px 0 24px;
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.65;
}

.portal-form-heading {
  margin: 30px 0 30px;
}

.portal-form {
  display: grid;
  gap: 20px;
  padding: 27px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-paper);
  box-shadow: 0 14px 36px rgba(23, 43, 36, 0.05);
}

.portal-form label {
  display: grid;
  gap: 8px;
  color: var(--portal-ink);
  font-size: 12px;
  font-weight: 650;
}

.portal-form label > small {
  margin-left: 5px;
  color: var(--portal-muted);
  font-size: 9px;
  font-weight: 500;
}

.portal-form input,
.portal-form select,
.portal-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--portal-ink);
  border: 1px solid #cfdcd5;
  border-radius: 5px;
  background: #fbfdfc;
  font-size: 13px;
  font-weight: 550;
}

.portal-form textarea {
  min-height: 92px;
  resize: vertical;
}

.portal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.portal-money-input {
  display: grid;
  grid-template-columns: 35px 1fr;
  align-items: center;
  min-height: 48px;
  border: 1px solid #cfdcd5;
  border-radius: 5px;
  background: #fbfdfc;
  overflow: hidden;
}

.portal-money-input > span {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--portal-muted);
  border-right: 1px solid var(--portal-line);
  font-size: 13px;
}

.portal-money-input input {
  min-height: 46px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.portal-money-input-large {
  grid-template-columns: 46px 1fr;
}

.portal-money-input-large input {
  font-size: 25px;
}

.portal-toggle {
  grid-template-columns: 20px 1fr;
  align-items: start;
  padding: 15px;
  border: 1px solid var(--portal-line);
  border-radius: 5px;
  background: #f7faf8;
}

.portal-toggle input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.portal-toggle span {
  display: grid;
  gap: 4px;
}

.portal-toggle small {
  color: var(--portal-muted);
  font-weight: 500;
}

.portal-submit {
  justify-self: start;
  min-width: 150px;
}

.portal-form-error {
  min-height: 1px;
  margin: -6px 0 0;
  color: #a43e32;
  font-size: 11px;
}

.portal-checkin-preview {
  padding: 15px;
  border-radius: 5px;
  background: var(--portal-mint);
  color: var(--portal-green-dark);
  font-size: 12px;
  line-height: 1.5;
}

.portal-checkin-preview span,
.portal-checkin-preview small {
  display: block;
}

.portal-checkin-preview strong {
  display: block;
  margin: 3px 0;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.portal-checkin-preview small {
  color: var(--portal-muted);
}

.portal-checkin-preview b {
  display: block;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid rgba(20, 86, 61, 0.14);
  font-size: 11px;
}

.portal-choice-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.portal-choice-fieldset legend {
  margin-bottom: 9px;
  color: var(--portal-ink);
  font-size: 12px;
  font-weight: 650;
}

.portal-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.portal-choice-grid label {
  display: block;
  cursor: pointer;
}

.portal-choice-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.portal-choice-grid label > span {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--portal-muted);
  border: 1px solid #cfdcd5;
  border-radius: 5px;
  background: #fbfdfc;
  transition: border-color 150ms, background 150ms, color 150ms;
}

.portal-choice-grid label:hover > span,
.portal-choice-grid input:checked + span {
  color: var(--portal-green-dark);
  border-color: #76ad94;
  background: var(--portal-mint);
}

.portal-choice-grid input:focus-visible + span {
  outline: 3px solid rgba(36, 122, 90, 0.28);
  outline-offset: 3px;
}

.portal-choice-grid svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.portal-choice-grid strong {
  font-size: 11px;
}

.portal-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: start;
  margin-top: 25px;
  padding: 30px;
  border-radius: 8px;
  color: #ffffff;
  background: #102b23;
}

.portal-detail-hero .portal-goal-icon {
  color: #102b23;
  background: #61d5aa;
}

.portal-detail-hero h1 {
  margin: 20px 0 8px;
  font-size: 38px;
  line-height: 1.15;
}

.portal-detail-hero p {
  margin: 0;
  color: #b7cdc2;
  font-size: 12px;
}

.portal-detail-hero > div:first-child > p {
  margin-top: 15px;
}

.portal-detail-amount {
  min-width: 210px;
  text-align: right;
}

.portal-detail-amount span {
  display: block;
  color: #9fbaad;
  font-size: 10px;
}

.portal-detail-amount strong {
  display: block;
  margin: 5px 0 3px;
  font-size: 32px;
  font-variant-numeric: tabular-nums;
}

.portal-detail-amount small {
  color: #61d5aa;
}

.portal-detail-progress {
  grid-column: 1 / -1;
}

.portal-detail-progress .portal-progress {
  background: rgba(255, 255, 255, 0.12);
}

.portal-detail-progress .portal-progress span {
  background: #61d5aa;
}

.portal-detail-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 9px;
  color: #a9c3b6;
  font-size: 10px;
}

.portal-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.portal-detail-actions .portal-primary {
  background: #61d5aa;
  border-color: #61d5aa;
  color: #102b23;
}

.portal-detail-actions .portal-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
  background: transparent;
}

.portal-goal-plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 20px 22px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-paper);
}

.portal-goal-plan > div {
  display: grid;
  gap: 5px;
}

.portal-goal-plan span {
  color: var(--portal-muted);
  font-size: 9px;
}

.portal-goal-plan strong {
  font-size: 13px;
}

.portal-goal-plan > p {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 15px;
  color: var(--portal-muted);
  border-top: 1px solid var(--portal-line);
  font-size: 12px;
  line-height: 1.55;
}

.portal-goal-plan > p span {
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.portal-history {
  margin-top: 22px;
  padding: 25px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-paper);
}

.portal-history h2 {
  margin: 0 0 18px;
  font-size: 18px;
}

.portal-history-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-history-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-top: 1px solid var(--portal-line);
}

.portal-history-item > span:first-child {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--portal-green);
  border-radius: 50%;
  background: var(--portal-mint);
}

.portal-history-item svg {
  width: 16px;
  height: 16px;
}

.portal-history-item p {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 12px;
}

.portal-history-item small {
  color: var(--portal-muted);
  font-size: 10px;
}

.portal-history-item em {
  max-width: 620px;
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.45;
}

.portal-history-item strong {
  font-size: 13px;
}

.portal-history-empty {
  margin: 0;
  padding: 20px 0 4px;
  color: var(--portal-muted);
  border-top: 1px solid var(--portal-line);
  font-size: 12px;
}

.portal-coaching-result {
  min-height: calc(100vh - 180px);
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.portal-result-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #102b23;
  border-radius: 50%;
  background: #61d5aa;
}

.portal-result-icon svg {
  width: 25px;
  height: 25px;
}

.portal-coaching-result > p {
  margin: 22px 0 7px;
  color: var(--portal-green);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.portal-coaching-result h1 {
  margin: 0;
  font-size: 36px;
}

.portal-result-amount {
  display: grid;
  gap: 4px;
  margin-top: 23px;
}

.portal-result-amount span {
  color: var(--portal-muted);
  font-size: 10px;
}

.portal-result-amount strong {
  font-size: 25px;
}

.portal-coaching-result blockquote {
  max-width: 590px;
  margin: 25px 0 0;
  padding: 21px 24px;
  color: #24483b;
  border: 1px solid #bddbcd;
  border-radius: 7px;
  background: var(--portal-mint);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
}

.portal-result-actions {
  display: flex;
  gap: 10px;
  margin-top: 25px;
}

.portal-coming {
  min-height: calc(100vh - 180px);
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.portal-coming > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--portal-green);
  border-radius: 50%;
  background: var(--portal-mint);
}

.portal-coming svg {
  width: 25px;
  height: 25px;
}

.portal-coming > p:nth-of-type(2) {
  margin-inline: auto;
}

.portal-coming > small {
  margin-top: 25px;
  padding: 7px 10px;
  color: var(--portal-green-dark);
  border: 1px solid #bbd7c9;
  border-radius: 4px;
  background: #ffffff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.portal-notice {
  width: min(1040px, 100%);
  margin: 22px auto -20px;
  padding: 12px 15px;
  border: 1px solid #b8d4c6;
  border-radius: 5px;
  color: var(--portal-green-dark);
  background: var(--portal-mint);
  font-size: 11px;
}

.portal-notice.is-error,
.portal-notice[data-tone="error"] {
  color: #8c352c;
  border-color: #e3c3bf;
  background: #fff2ef;
}

.portal-menu-toggle,
.portal-scrim {
  display: none;
}

@media (max-width: 820px) {
  .portal-shell {
    display: block;
  }

  .portal-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(286px, calc(100vw - 46px));
    height: 100vh;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: none;
  }

  .portal-shell.is-menu-open .portal-sidebar {
    transform: translateX(0);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.18);
  }

  .portal-menu-toggle {
    position: fixed;
    top: 17px;
    left: 16px;
    z-index: 42;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--portal-ink);
    border: 1px solid var(--portal-line);
    border-radius: 5px;
    background: #ffffff;
    cursor: pointer;
  }

  .portal-menu-toggle svg {
    width: 20px;
    height: 20px;
  }

  .portal-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    background: rgba(3, 14, 10, 0.42);
  }

  .portal-main {
    padding: 0 18px 60px;
  }

  .portal-topbar {
    min-height: 76px;
    padding-left: 55px;
  }

  .portal-view {
    padding-top: 36px;
  }
}

@media (max-width: 650px) {
  .portal-welcome {
    display: grid;
    align-items: start;
  }

  .portal-welcome h1,
  .portal-form-heading h1,
  .portal-coming h1 {
    font-size: 32px;
  }

  .portal-welcome .portal-primary {
    justify-self: start;
  }

  .portal-summary {
    grid-template-columns: 1fr 1fr;
  }

  .portal-summary > div {
    padding: 16px;
  }

  .portal-summary > div:nth-child(2) {
    border-right: 0;
  }

  .portal-summary > div:last-child {
    grid-column: auto;
    border-top: 1px solid var(--portal-line);
  }

  .portal-summary > div:nth-child(3) {
    border-top: 1px solid var(--portal-line);
  }

  .portal-habit-snapshot {
    padding: 20px 18px;
  }

  .portal-habit-grid {
    grid-template-columns: 1fr;
  }

  .portal-habit-grid > div,
  .portal-habit-grid > div:not(:first-child) {
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .portal-habit-grid > div:last-child {
    border-bottom: 0;
  }

  .portal-goal-grid,
  .portal-form-row {
    grid-template-columns: 1fr;
  }

  .portal-form {
    padding: 21px 18px;
  }

  .portal-detail-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .portal-detail-amount {
    min-width: 0;
    text-align: left;
  }

  .portal-detail-progress {
    grid-column: auto;
  }

  .portal-detail-actions {
    flex-direction: column;
  }

  .portal-detail-actions > * {
    width: 100%;
  }

  .portal-goal-plan {
    grid-template-columns: 1fr 1fr;
  }

  .portal-goal-plan .portal-secondary,
  .portal-goal-plan > p {
    grid-column: 1 / -1;
  }

  .portal-result-actions {
    width: 100%;
    flex-direction: column;
  }

  .portal-result-actions > * {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .portal-main {
    padding-inline: 14px;
  }

  .portal-section-heading {
    align-items: start;
  }

  .portal-goal-card {
    padding: 19px;
  }

  .portal-goal-actions {
    flex-direction: column;
  }

  .portal-history {
    padding: 20px 18px;
  }

  .portal-habit-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .portal-choice-grid,
  .portal-goal-plan {
    grid-template-columns: 1fr;
  }

  .portal-goal-plan .portal-secondary,
  .portal-goal-plan > p {
    grid-column: auto;
  }

  .portal-history-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .portal-history-item > strong {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-shell *,
  .portal-shell *::before,
  .portal-shell *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
