/* =============================================================================
   Platform additions to the ported Hugo theme: landing, sign-in, dashboard,
   subscribe forms, notices. Kept separate from theme.css so the theme stays a
   faithful copy of the original stylesheet.
   ============================================================================= */

.muted { color: var(--color-muted); }
.badge, .post-badge {
  display: inline-block; margin-left: 0.5em; padding: 0.1em 0.5em; border-radius: 999px;
  font-size: 0.75rem; background: var(--current-persona-color, var(--color-accent)); color: #fff; vertical-align: middle;
}
.button, button {
  display: inline-block; padding: 0.5em 1.1em; border: 1px solid var(--current-persona-color, var(--color-accent));
  border-radius: 6px; background: var(--current-persona-color, var(--color-accent)); color: #fff; font: inherit;
  cursor: pointer; text-decoration: none;
}
.button:hover, button:hover { filter: brightness(0.92); }
.button--quiet, button.button--quiet { background: transparent; color: var(--color-text); border-color: #ccc; }
.button--danger, button.button--danger { background: transparent; color: #a12; border-color: #a12; }
.button--small { padding: 0.25em 0.7em; font-size: 0.85rem; }
button:disabled { opacity: 0.6; cursor: default; }
.inline-form { display: inline; }
.flash { padding: 0.75em 1em; border-left: 4px solid var(--color-accent); background: rgba(0, 0, 0, 0.04); }
.form-error { color: #a12; }
code { font-family: var(--font-code); font-size: 0.9em; background: rgba(0, 0, 0, 0.05); padding: 0.1em 0.3em; border-radius: 3px; }

/* Landing (platform root) */
.landing .hero-tagline { max-width: 40rem; margin: 0 auto var(--space-md); }
.landing__actions { margin-top: var(--space-md); }
.landing__features { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: var(--max-content-width); margin: var(--space-lg) auto; padding: 0 var(--space-md); }
.landing__features .card { border-left: 4px solid var(--color-accent); padding: var(--space-md); background: #fff; }

/* Sign-in and account (identity host) */
.auth-page, .account-page, .notice-page, .error-page { max-width: 32rem; margin: var(--space-lg) auto; padding: 0 var(--space-md); }
.account-page { max-width: var(--max-content-width); }
.auth-form label, .subscribe-form label, .admin-form label { display: block; margin: 0.75em 0 0.35em; font-weight: 600; }
.auth-form input, .subscribe-form input:not([type=checkbox]), .subscribe-form select, .admin-form input:not([type=checkbox]):not([type=file]), .admin-form select, .admin-form textarea, .filter-form select {
  display: block; width: 100%; padding: 0.5em 0.6em; border: 1px solid #ccc; border-radius: 6px; font: inherit; background: #fff;
}
.admin-form input.short { width: 6em; display: inline-block; }
.auth-form button, .subscribe-form button, .admin-form > button { margin-top: 1em; }
.workspace-list { list-style: none; padding: 0; }
.workspace-list li { padding: 0.6em 0; border-bottom: 1px solid #eee; }

/* Subscribe form on portfolio pages */
.subscribe-form { margin: var(--space-lg) 0; padding: var(--space-md); border: 1px solid #e5e5e5; border-radius: 8px; background: #fff; }
.subscribe-form h3 { margin-top: 0; }
.subscribe-form fieldset { border: none; padding: 0; margin: 0.75em 0; }
.subscribe-form fieldset label, .admin-form label.checkbox { font-weight: 400; display: block; margin: 0.25em 0; }

/* Dashboard */
body.admin { background: #f6f5f2; }
.admin-main { max-width: 64rem; }
.admin .nav-links a.active { font-weight: 700; }
.stat-row { display: flex; gap: var(--space-md); flex-wrap: wrap; margin: var(--space-md) 0; }
.stat { flex: 1 1 8rem; padding: var(--space-md); background: #fff; border-radius: 8px; text-decoration: none; color: inherit; border: 1px solid #e5e5e5; }
.stat strong { display: block; font-size: 1.8rem; }
.admin-section { margin: var(--space-lg) 0; }
.admin-section.attention { padding: var(--space-md); border-left: 4px solid #a12; background: #fff4f4; }
/* A scheduled send is information, not a problem, so it borrows the shape of the attention block but not its
   alarm colour — red here would make every healthy queued portfolio look broken. */
.admin-section.next-send { padding: var(--space-md); border-left: 4px solid #2a6; background: #f3fbf6; }
.admin-section.next-send h2 { margin-top: 0; }
.admin-section.next-send p { margin: 0.35em 0; }
.next-sends .admin-table td { vertical-align: top; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; }
.admin-table th, .admin-table td { text-align: left; padding: 0.6em 0.75em; border-bottom: 1px solid #eee; vertical-align: top; }
.admin-table th { font-weight: 600; color: var(--color-muted); font-size: 0.85rem; }
.admin-form { background: #fff; padding: var(--space-md); border-radius: 8px; border: 1px solid #e5e5e5; }
.admin-form fieldset { border: 1px solid #eee; border-radius: 6px; padding: 0.5em 1em 1em; margin: 1em 0; }
.admin-form legend { font-weight: 600; padding: 0 0.4em; }
.form-row { display: flex; gap: var(--space-md); flex-wrap: wrap; align-items: end; }
.form-row > label, .form-row > input { flex: 1 1 12rem; }
.form-row__label { flex: 0 0 7rem; font-weight: 600; padding-bottom: 0.5em; }
.filter-form { display: flex; gap: 0.5em; margin: var(--space-md) 0; }
.filter-form select { width: auto; display: inline-block; }
.action-row { display: flex; gap: 0.75em; flex-wrap: wrap; align-items: center; }
.action-row input[type=datetime-local] { padding: 0.4em; border: 1px solid #ccc; border-radius: 6px; font: inherit; }
.post-status { padding: 0.5em 0; }
.upload-form { margin-bottom: var(--space-md); }
.footer-account { margin-top: var(--space-md); font-size: 0.9rem; }

@media (max-width: 600px) {
  .form-row { flex-direction: column; align-items: stretch; }
}

/* Dashboard: navigation groups, tabs, page intros ------------------------------------------------------------- */
.admin-nav .nav-links { flex-wrap: wrap; row-gap: 0.25em; }
.nav-group { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); padding: 0.5em 0.4em 0 0.75em; align-self: center; }
.page-intro { color: var(--color-muted); margin: -0.5em 0 1.25em; max-width: 48rem; }
.tabs { display: flex; gap: 0.25em; border-bottom: 1px solid #ddd; margin: 0.5em 0 1em; }
.tabs a { padding: 0.5em 0.9em; text-decoration: none; color: var(--color-text); border-bottom: 2px solid transparent; }
.tabs a.active { border-bottom-color: var(--color-accent); font-weight: 600; }

/* Home checklist */
.checklist-section { padding: var(--space-md); background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; }
.checklist { margin: 0; padding-left: 1.4em; }
.checklist li { padding: 0.25em 0; }
.checklist li.done { color: var(--color-muted); text-decoration: line-through; list-style: '✓ '; }
.checklist-done { color: var(--color-muted); }

/* Fields with hints, radio cards, cards */
.field { display: block; margin: 0.9em 0; }
.field__label { display: block; font-weight: 600; }
.field__hint { display: block; font-weight: 400; font-size: 0.85rem; color: var(--color-muted); margin: 0.1em 0 0.35em; }
.field.checkbox { display: flex; gap: 0.6em; align-items: baseline; }
.field.checkbox .field__label { display: inline; }
.field.checkbox .field__hint { display: block; }
.admin-form .field input:not([type=checkbox]):not([type=radio]):not([type=color]), .admin-form .field select, .admin-form .field textarea { display: block; width: 100%; padding: 0.5em 0.6em; border: 1px solid #ccc; border-radius: 6px; font: inherit; background: #fff; }
.admin-form .field input.short { width: 8em; }
.admin-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; padding: 0.25em 1em 0.75em; margin: 1em 0; }
.admin-card > summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; padding: 0.5em 0; }
.radio-cards { border: none; padding: 0; margin: 1em 0; }
.radio-cards legend { font-weight: 600; padding: 0; margin-bottom: 0.4em; }
.radio-card { display: grid; grid-template-columns: auto 1fr; column-gap: 0.6em; align-items: start; padding: 0.6em 0.8em; border: 1px solid #ddd; border-radius: 8px; margin: 0.35em 0; cursor: pointer; background: #fff; }
.radio-card:has(input:checked) { border-color: var(--color-accent); box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.25); }
.radio-card input { grid-row: span 2; margin-top: 0.3em; }
.radio-card__title { font-weight: 600; }
.radio-card__hint { grid-column: 2; font-size: 0.85rem; color: var(--color-muted); }
.radio-cards__more summary { cursor: pointer; color: var(--color-muted); font-size: 0.9rem; margin: 0.3em 0; }
.address__preview { margin: 0.2em 0 0.4em; font-family: var(--font-code); }
.address details summary { cursor: pointer; font-size: 0.9rem; color: var(--color-muted); }

/* Wizard */
.wizard-steps { display: flex; gap: 1.5em; list-style: none; padding: 0; margin: 0 0 0.75em; counter-reset: step; }
.wizard-steps li { color: var(--color-muted); }
.wizard-steps li::before { counter-increment: step; content: counter(step) ' · '; }
.wizard-steps li.current { color: var(--color-text); font-weight: 700; }
.wizard-steps li.done { text-decoration: line-through; }
.wizard-steps a { color: inherit; }
.wizard-actions { display: flex; gap: 0.75em; align-items: center; margin-top: 1.25em; }
/* The skip sits apart from the two buttons: it is the quiet way out, not a third action. */
.wizard-skip { margin-left: auto; font-size: 0.9rem; }

/* Look: pickers, palettes and the live preview */
.look { display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(18rem, 1.2fr); gap: var(--space-md); align-items: start; }
.pickers input[type=color] { width: 4em; height: 2.4em; padding: 0.15em; border: 1px solid #ccc; border-radius: 6px; background: #fff; cursor: pointer; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.5em; margin: 0.3em 0 1em; }
.swatch { display: inline-flex; flex-direction: column; align-items: center; gap: 0.25em; padding: 0.4em; border: 1px solid #ddd; border-radius: 8px; cursor: pointer; background: #fff; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch:has(input:checked) { border-color: var(--color-text); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15); }
.swatch__colors { display: flex; gap: 2px; }
.swatch__colors i { display: block; width: 1.4em; height: 1.4em; border-radius: 4px; }
.swatch__label { font-size: 0.75rem; }
.theme-preview { pointer-events: none; border: 1px solid #e5e5e5; border-radius: 8px; overflow: hidden; background: var(--color-bg); font-size: 0.85rem; }
.theme-preview .site-header { padding: 0.5rem 1rem; border-bottom: 3px solid var(--current-persona-color); }
.theme-preview .main-nav { padding: 0; }
.theme-preview .nav-links { gap: 1em; }
.theme-preview__body { padding: 1rem; }
.theme-preview .post-title { font-size: 1.3rem; margin: 0 0 0.25em; }
.theme-preview .card { margin: 0.75em 0; padding: 0.75em; background: #fff; }
.theme-preview .card--alt { border-left: 4px solid var(--current-persona-secondary); }
.theme-preview .badge--accent { background: var(--current-persona-accent); }
.badge--accent { background: var(--current-persona-accent, var(--color-accent)); }

/* Social profile picker */
.social-row { display: grid; grid-template-columns: 7rem 1fr 1.4fr auto; gap: 0.5em; align-items: center; margin: 0.4em 0; }
.social-row__platform { font-weight: 600; }
.admin-form .social-row input { display: block; width: 100%; padding: 0.45em 0.6em; border: 1px solid #ccc; border-radius: 6px; font: inherit; background: #fff; }
.social-picker__add { display: flex; gap: 0.5em; align-items: center; margin-top: 0.6em; }
.social-picker__add select { width: auto; padding: 0.45em 0.6em; border: 1px solid #ccc; border-radius: 6px; font: inherit; background: #fff; }

@media (max-width: 720px) {
  .look { grid-template-columns: 1fr; }
  .social-row { grid-template-columns: 1fr; }
}

/* Email preview: the real email document in a same-origin frame. */
.email-frame { width: 100%; height: 70vh; min-height: 480px; border: 1px solid #ddd; border-radius: 8px; background: #f6f5f2; }

/* Radio cards live inside .admin-form, whose generic label/input rules would otherwise flatten them. */
.admin-form label.radio-card { display: grid; font-weight: 400; margin: 0.35em 0; }
.admin-form .radio-card input { width: auto; display: inline-block; }
.nav-sep { border-left: 1px solid #ddd; margin: 0 0.5em; align-self: stretch; }

/* Account menu: a <details> dropdown, so it opens with no JavaScript at all. */
.nav-account { margin-left: auto; position: relative; }
.account-menu__signin { font-size: 0.95rem; }
.account-menu { position: relative; }
.account-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu__avatar { display: inline-flex; align-items: center; justify-content: center; width: 2em; height: 2em; border-radius: 50%; background: var(--color-accent, #c9a227); color: #fff; font-weight: 600; }
.account-menu__panel { position: absolute; right: 0; top: calc(100% + 0.5em); z-index: 20; width: 18rem; max-width: calc(100vw - 2rem); padding: 0.75em 1em; background: #fff; border: 1px solid #ddd; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.account-menu__who { margin: 0 0 0.5em; font-weight: 600; word-break: break-all; }
.account-menu__section { border-top: 1px solid #eee; padding-top: 0.5em; margin-top: 0.5em; }
.account-menu__heading { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); margin: 0 0 0.35em; }
.account-menu__list { list-style: none; margin: 0; padding: 0; }
.account-menu__list li { margin: 0.2em 0; }
.account-menu__list a { text-decoration: none; display: block; padding: 0.2em 0; }
.account-menu__list a:hover { text-decoration: underline; }
.account-menu__empty { margin: 0.2em 0; font-size: 0.9rem; color: var(--color-muted); }
.account-menu__more > summary { cursor: pointer; font-size: 0.85rem; color: var(--color-muted); margin-top: 0.3em; }
.account-menu__footer { display: flex; justify-content: space-between; align-items: center; gap: 0.5em; border-top: 1px solid #eee; margin-top: 0.5em; padding-top: 0.5em; }
@media (max-width: 720px) { .account-menu__panel { width: 16rem; } }

/* Membership tiers a creator offers, and the rows on the account page. */
.tier-offers { margin: 1.5em 0; }
.tier-offers__list { list-style: none; margin: 0; padding: 0; }
.tier-offer { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: 0.7em 0.9em; border: 1px solid #ddd; border-radius: 8px; margin: 0.4em 0; background: #fff; }
.relation { display: flex; justify-content: space-between; align-items: center; gap: 1em; }
.relation__controls { display: flex; gap: 0.4em; flex-shrink: 0; }
@media (max-width: 720px) { .tier-offer, .relation { flex-direction: column; align-items: flex-start; } }

/* Share row under a post: a selectable link field plus the two places people actually send things. */
.share-row { display: flex; gap: 0.6em; flex-wrap: wrap; align-items: flex-end; margin-top: var(--space-md, 1em); }
.share-row__field { display: flex; flex-direction: column; gap: 0.2em; flex: 1 1 18rem; font-size: 0.85rem; }
.share-row__field input { width: 100%; padding: 0.45em 0.6em; border: 1px solid #ccc; border-radius: 6px; font: inherit; background: #fff; }
.share-row [data-share-copy] { white-space: nowrap; }
@media (max-width: 720px) { .share-row__field { flex-basis: 100%; } }

/* Comments under a post. */
.comments { margin: var(--space-lg, 2em) 0; }
.comment { padding: 0.75em 0; border-top: 1px solid #e5e5e5; }
.comment__meta { font-size: 0.9rem; color: var(--color-muted); }
.comment__meta strong { color: var(--color-text); }
.comment__body { margin: 0.35em 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { margin-top: var(--space-md, 1em); }
.comment-form textarea { width: 100%; padding: 0.5em 0.6em; border: 1px solid #ccc; border-radius: 6px; font: inherit; }

/* Home timeline on the identity host: unthemed rows from many creators. */
.timeline { margin: var(--space-lg, 2em) 0; }
.timeline-row { padding: 0.9em 0; border-top: 1px solid #e5e5e5; }
.timeline-row__meta { margin: 0 0 0.25em; font-size: 0.9rem; }
.timeline-row__title { margin: 0.1em 0 0.25em; font-size: 1.15rem; }
.timeline-row__title a { text-decoration: none; }
.timeline-row__title a:hover { text-decoration: underline; }
.timeline-row__locked { margin: 0.2em 0; }
.timeline-hidden { padding: 0.6em 0; border-top: 1px solid #f0f0f0; font-size: 0.9rem; }
