/* ==========================================================================
   E3C — landing page styles
   Derived from draft/E3C Ledger Prototype.html (isSignin view).

   Everything here is scoped under .e3c so it cannot affect the existing
   pages that still use style.css / idea.css / share.css.
   ========================================================================== */

.e3c {
    --e3c-paper:       #efece4;
    --e3c-ink:         #141414;
    --e3c-accent:      #ff2e12;
    --e3c-ink-56:      rgba(20, 20, 20, .56);
    --e3c-ink-70:      rgba(20, 20, 20, .70);
    --e3c-ink-20:      rgba(20, 20, 20, .20);

    --e3c-display: 'Archivo', Helvetica, sans-serif;
    --e3c-body:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --e3c-mono:    'JetBrains Mono', ui-monospace, monospace;

    --e3c-rule: 2px solid var(--e3c-ink);

    min-height: 100vh;
    background: var(--e3c-paper);
    font-family: var(--e3c-body);
    color: var(--e3c-ink);
    -webkit-font-smoothing: antialiased;
}

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

.e3c a         { color: var(--e3c-accent); }
.e3c a:hover   { color: var(--e3c-ink); }
.e3c ::placeholder { color: var(--e3c-ink-56); }

.e3c-shell {
    width: 100%;
    padding: 0 0 60px;
}

/* --- masthead ----------------------------------------------------------- */

.e3c-masthead {
    display: flex;
    align-items: stretch;
    border-bottom: var(--e3c-rule);
    flex-wrap: wrap;
}

.e3c-wordmark {
    padding: 14px 24px;
    border-right: var(--e3c-rule);
    font: 900 20px/1 var(--e3c-display);
    letter-spacing: -.02em;
}

.e3c-masthead__tagline {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    padding: 12px 24px;
    font: 500 11px var(--e3c-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* --- two-column split --------------------------------------------------- */

/* Lede takes all remaining width; the process rail is capped at 500px so
   the accordion has room for its body copy. */
.e3c-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 500px);
    border-bottom: var(--e3c-rule);
}

.e3c-lede {
    padding: 52px 34px 46px;
    border-right: var(--e3c-rule);
    /* Lets the headline size against this column's width rather than the
       viewport's. The process rail is a fixed 400px, so a vw-based headline
       overflows at mid widths where the rail eats a large share of the screen. */
    container-type: inline-size;
}

/* Below the breakpoint the two columns stack, so the lede's right-hand
   rule has to become a bottom rule. */
@media (max-width: 899px) {
    .e3c-split { grid-template-columns: minmax(0, 1fr); }

    .e3c-lede {
        border-right: none;
        border-bottom: var(--e3c-rule);
    }
}

.e3c-headline {
    margin: 0;
    /* Fallback for browsers without container query units. */
    font: 900 clamp(46px, 6.2vw, 96px)/.92 var(--e3c-display);
    letter-spacing: -.045em;
    text-transform: uppercase;
}

/* "stress-tested" is the longest line at roughly 8em wide, so 11cqw keeps
   it inside the column with margin to spare at every width. */
@supports (font-size: 1cqw) {
    .e3c-headline { font-size: clamp(46px, 11cqw, 150px); }
}

.e3c-headline em {
    font-style: normal;
    color: var(--e3c-accent);
}

.e3c-standfirst {
    margin: 26px 0 0;
    max-width: 62ch;
    font: 400 16px/1.6 var(--e3c-body);
    text-wrap: pretty;
}

@supports (font-size: 1cqw) {
    .e3c-standfirst { font-size: clamp(15px, 1.35cqw, 19px); }
}

/* --- sign-in ------------------------------------------------------------ */

.e3c-signin {
    display: flex;
    margin-top: 34px;
    border: var(--e3c-rule);
    max-width: 620px;
}

.e3c-signin__input {
    flex: 1;
    min-width: 0;
    border: none;
    background: #fff;
    padding: 14px 15px;
    font: 400 13px var(--e3c-mono);
    color: var(--e3c-ink);
}

.e3c-signin__input:focus { outline: none; }

.e3c-signin__submit {
    border: none;
    border-left: var(--e3c-rule);
    background: var(--e3c-ink);
    color: var(--e3c-paper);
    padding: 0 22px;
    font: 700 12px var(--e3c-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}

.e3c-signin__submit:hover,
.e3c-signin__submit:focus-visible {
    background: var(--e3c-accent);
    color: var(--e3c-ink);
}

.e3c-signin__note {
    margin-top: 10px;
    font: 400 11.5px/1.5 var(--e3c-mono);
    color: var(--e3c-ink-70);
}

/* Signed-in variant: same frame, two actions instead of a form. */
.e3c-identity {
    display: flex;
    margin-top: 34px;
    border: var(--e3c-rule);
    max-width: 620px;
}

.e3c-identity__who {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    background: #fff;
    padding: 14px 15px;
    font: 400 13px var(--e3c-mono);
    color: var(--e3c-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.e3c-identity__enter {
    display: flex;
    align-items: center;
    border-left: var(--e3c-rule);
    background: var(--e3c-ink);
    color: var(--e3c-paper);
    padding: 0 22px;
    font: 700 12px var(--e3c-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .12s ease, color .12s ease;
}

.e3c .e3c-identity__enter        { color: var(--e3c-paper); }
.e3c .e3c-identity__enter:hover,
.e3c .e3c-identity__enter:focus-visible {
    background: var(--e3c-accent);
    color: var(--e3c-ink);
}

/* --- process list ------------------------------------------------------- */

.e3c-process {
    display: flex;
    flex-direction: column;
}

.e3c-process__label {
    padding: 18px 24px;
    border-bottom: var(--e3c-rule);
    font: 500 11px var(--e3c-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.e3c-stage {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 17px 24px;
    border-bottom: 1px solid var(--e3c-ink-20);
}

.e3c-stage__num {
    font: 900 30px/1 var(--e3c-display);
    min-width: 48px;
    color: var(--e3c-ink);
}

.e3c-stage:first-of-type .e3c-stage__num { color: var(--e3c-accent); }

.e3c-stage__title { font: 500 14px/1.3 var(--e3c-body); }

/* --- accordion variant ---------------------------------------------------
   Native <details>/<summary>, so it is keyboard-operable and expands with
   JavaScript disabled. The row keeps the same geometry as the plain stage.
   ------------------------------------------------------------------------ */

.e3c-stage--accordion { display: block; padding: 0; }

.e3c-stage__summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 17px 24px;
    cursor: pointer;
    list-style: none;
    transition: background .12s ease;
}

/* Hide the default disclosure triangle in both engines. */
.e3c-stage__summary::-webkit-details-marker { display: none; }
.e3c-stage__summary::marker { content: ''; }

.e3c-stage__summary:hover { background: #e5e1d6; }

.e3c-stage__summary:focus-visible {
    outline: 2px solid var(--e3c-accent);
    outline-offset: -2px;
}

/* Our own +/− marker, pushed to the far right. */
.e3c-stage__marker {
    margin-left: auto;
    position: relative;
    width: 13px;
    height: 13px;
    flex: none;
}

.e3c-stage__marker::before,
.e3c-stage__marker::after {
    content: '';
    position: absolute;
    background: var(--e3c-ink);
    transition: transform .15s ease, opacity .15s ease;
}

.e3c-stage__marker::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

.e3c-stage__marker::after {
    left: 50%;
    top: 0;
    height: 100%;
    width: 2px;
    transform: translateX(-50%);
}

/* Open: the vertical stroke collapses, leaving a minus. */
.e3c-stage--accordion[open] .e3c-stage__marker::after {
    transform: translateX(-50%) scaleY(0);
    opacity: 0;
}

.e3c-stage--accordion[open] .e3c-stage__num { color: var(--e3c-accent); }

/* The outer element is what the script animates, so it carries no padding
   of its own — padding on an animating box makes the height jump at 0. */
.e3c-stage__body { overflow: hidden; }

.e3c-stage__bodyinner {
    padding: 0 24px 20px 64px;
    font: 400 13.5px/1.65 var(--e3c-body);
    color: var(--e3c-ink-70);
    text-wrap: pretty;
}

/* The accordion supplies its own numbering colour, so the landing page's
   "first row is accent" rule must not also fire here. */
.e3c-stage--accordion:first-of-type .e3c-stage__num { color: var(--e3c-ink); }
.e3c-stage--accordion[open]:first-of-type .e3c-stage__num { color: var(--e3c-accent); }

@media (max-width: 899px) {
    .e3c-stage__bodyinner { padding-left: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .e3c-stage__marker::before,
    .e3c-stage__marker::after { transition: none; }
}

/* Stages that have a route behind them become links. */
.e3c .e3c-stage--link {
    text-decoration: none;
    color: var(--e3c-ink);
    transition: background .12s ease;
}

.e3c .e3c-stage--link:hover { background: #e5e1d6; }

.e3c .e3c-stage--link:focus-visible {
    outline: 2px solid var(--e3c-accent);
    outline-offset: -2px;
}

/* Completed stages: a rule through the number, muted title. */
.e3c-stage.is-done .e3c-stage__num { color: var(--e3c-ink-56); }
.e3c-stage.is-done .e3c-stage__title { color: var(--e3c-ink-70); }

.e3c-stage__badge {
    margin-left: auto;
    padding: 3px 8px;
    background: var(--e3c-accent);
    color: var(--e3c-ink);
    font: 700 9.5px var(--e3c-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Marks the stage an idea is currently at, when the rail is given
   an active_stage. */
.e3c-stage.is-active {
    background: var(--e3c-ink);
    color: var(--e3c-paper);
}

.e3c-stage.is-active .e3c-stage__num { color: var(--e3c-accent); }

/* When a panel is used as the left column of a split, it needs the
   dividing rule the lede carries on the landing page. */
.e3c-split > .e3c-panel { border-right: var(--e3c-rule); }

@media (max-width: 899px) {
    .e3c-split > .e3c-panel {
        border-right: none;
        border-bottom: var(--e3c-rule);
    }
}

/* The last stage carries the column's closing rule, since nothing
   follows it now. */
.e3c-stage:last-of-type { border-bottom: none; }

/* --- prose sections ------------------------------------------------------
   The long-form copy that sits below the hero. Each block is a mono label
   in a left rail with the body text beside it, separated by hairlines —
   the same rule-and-label grammar as the process list above.
   ------------------------------------------------------------------------ */

.e3c-block {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    border-bottom: 1px solid var(--e3c-ink-20);
}

.e3c-block:last-of-type { border-bottom: none; }

.e3c-block__label {
    padding: 34px 24px 34px 34px;
    border-right: 1px solid var(--e3c-ink-20);
    font: 500 11px var(--e3c-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.e3c-block__body {
    padding: 34px;
    max-width: 68ch;
}

.e3c-block__body p {
    margin: 0 0 16px;
    font: 400 15px/1.7 var(--e3c-body);
    text-wrap: pretty;
}

.e3c-block__body p:last-child { margin-bottom: 0; }

.e3c-block__body a { text-decoration: none; border-bottom: 1px solid currentColor; }

@media (max-width: 899px) {
    .e3c-block { grid-template-columns: minmax(0, 1fr); }

    .e3c-block__label {
        padding: 26px 24px 0;
        border-right: none;
    }

    .e3c-block__body { padding: 14px 24px 30px; }
}

/* --- flash messages ------------------------------------------------------
   flash_messages.twig.html is shared with the other pages and carries inline
   styles, which beat a stylesheet on specificity. These !important rules are
   scoped to .e3c only, so the partial renders in-brand here without changing
   how it looks anywhere else. Remove them if that partial ever loses its
   inline styles.
   ------------------------------------------------------------------------ */

.e3c .flash-messages { margin-bottom: 26px; }

.e3c .flash-messages .alert {
    background: #fff !important;
    color: var(--e3c-ink) !important;
    border-radius: 0 !important;
    border-left: 4px solid var(--e3c-ink) !important;
    padding: 12px 15px !important;
    margin-bottom: 8px !important;
    font: 400 12.5px/1.5 var(--e3c-mono) !important;
}

.e3c .flash-messages .alert-danger  { border-left-color: var(--e3c-accent) !important; }
.e3c .flash-messages .alert-success { border-left-color: var(--e3c-ink) !important; }

/* ==========================================================================
   Signed-in application chrome
   Converted from the isApp / isIdeas views of the same prototype.
   ========================================================================== */

/* --- top bar ------------------------------------------------------------ */

.e3c-topbar {
    display: flex;
    border-bottom: var(--e3c-rule);
    flex-wrap: wrap;
    background: var(--e3c-paper);
}

.e3c-topbar__brand {
    padding: 12px 24px;
    border-right: var(--e3c-rule);
    font: 900 16px/1 var(--e3c-display);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.e3c .e3c-topbar__brand { color: var(--e3c-ink); }

.e3c-topbar__nav {
    flex: 1;
    display: flex;
    min-width: 200px;
    flex-wrap: wrap;
}

.e3c-topbar__link {
    padding: 12px 18px;
    border-right: 1px solid var(--e3c-ink-20);
    font: 700 11px var(--e3c-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: background .12s ease, color .12s ease;
}

.e3c .e3c-topbar__link          { color: var(--e3c-ink); }
.e3c .e3c-topbar__link:hover    { background: var(--e3c-ink); color: var(--e3c-paper); }

/* Current section, mirroring the prototype's active tab. */
.e3c .e3c-topbar__link.is-current {
    background: var(--e3c-ink);
    color: var(--e3c-paper);
}

/* Present but not navigable — no route behind it yet. */
.e3c .e3c-topbar__link.is-disabled {
    color: var(--e3c-ink-56);
    cursor: default;
}

.e3c .e3c-topbar__link.is-disabled:hover {
    background: none;
    color: var(--e3c-ink-56);
}

/* Form fields */
.e3c-field { margin-bottom: 20px; max-width: 640px; }

.e3c-field__label {
    display: block;
    margin-bottom: 6px;
    font: 500 10.5px var(--e3c-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--e3c-ink-70);
}

/* Definition-list fields (profile) */
.e3c-fields {
    margin: 0;
    max-width: 640px;
}

.e3c-fields dt {
    font: 500 10.5px var(--e3c-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--e3c-ink-70);
    padding-top: 16px;
}

.e3c-fields dd {
    margin: 4px 0 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--e3c-ink-20);
    font: 400 16px/1.5 var(--e3c-body);
    overflow-wrap: anywhere;
}

.e3c-fields dd:last-child { border-bottom: none; }

/* Guidelines list */
.e3c-rules {
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 90ch;
    counter-reset: rule;
}

.e3c-rules li {
    counter-increment: rule;
    position: relative;
    padding: 14px 0 14px 54px;
    border-bottom: 1px solid var(--e3c-ink-20);
    font: 400 15px/1.6 var(--e3c-body);
    text-wrap: pretty;
}

.e3c-rules li:last-child { border-bottom: none; }

.e3c-rules li::before {
    content: counter(rule, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 14px;
    font: 700 13px var(--e3c-mono);
    color: var(--e3c-accent);
}

.e3c-topbar__user {
    padding: 12px 20px;
    border-left: var(--e3c-rule);
    font: 500 11px var(--e3c-mono);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

.e3c .e3c-topbar__signout {
    border: none;
    background: none;
    padding: 0;
    font: 500 11px var(--e3c-mono);
    text-transform: uppercase;
    text-decoration: underline;
    cursor: pointer;
    color: var(--e3c-ink-70);
}

.e3c .e3c-topbar__signout:hover { color: var(--e3c-accent); }

/* --- section header ----------------------------------------------------- */

.e3c-sectionhead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 30px;
    border-bottom: var(--e3c-rule);
    flex-wrap: wrap;
}

.e3c-sectionhead__eyebrow {
    font: 500 10.5px var(--e3c-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--e3c-ink-70);
}

.e3c-sectionhead__title {
    margin: 8px 0 0;
    font: 900 clamp(34px, 4.4vw, 46px)/.95 var(--e3c-display);
    letter-spacing: -.035em;
    text-transform: uppercase;
}

.e3c-btn {
    border: var(--e3c-rule);
    background: var(--e3c-accent);
    padding: 13px 20px;
    font: 700 12px var(--e3c-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background .12s ease, color .12s ease;
}

.e3c .e3c-btn        { color: var(--e3c-ink); }
.e3c .e3c-btn:hover  { background: var(--e3c-ink); color: var(--e3c-paper); }

/* Secondary action: same geometry as .e3c-btn, no fill. */
.e3c-btn--ghost { background: none; }

.e3c .e3c-btn--ghost:hover {
    background: var(--e3c-ink);
    color: var(--e3c-paper);
}

/* --- back link ----------------------------------------------------------
   Returns to the ideas overview from a stage or detail page.
   ------------------------------------------------------------------------ */

.e3c-backlink {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    font: 700 11px var(--e3c-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
}

.e3c .e3c-backlink { color: var(--e3c-ink-70); }
.e3c .e3c-backlink:hover { color: var(--e3c-accent); }

.e3c-backlink__arrow { font-size: 14px; line-height: 1; }

/* Back link on the left, the stage's Edit or Save actions on the right */
.e3c-panelhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.e3c-panelhead .e3c-backlink { margin-bottom: 0; }

.e3c-panelhead__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-left: auto;
}

/* Buttons and links side by side share one fixed height. The panel's
   button rule resets line-height through its font shorthand, so <button>
   and <a> would otherwise size differently. */
.e3c-panel .e3c-panelhead__actions .e3c-btn,
.e3c-panel .e3c-panelhead__actions button,
.e3c-panel .e3c-dialog__actions button {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 20px;
    line-height: 1;
}

/* Primary actions (Edit, Save & continue) take the red fill of .e3c-btn,
   overriding the dark default for buttons inside a panel */
.e3c-panel button.e3c-btn {
    background: var(--e3c-accent);
    color: var(--e3c-ink);
}

.e3c-panel button.e3c-btn:hover {
    background: var(--e3c-ink);
    color: var(--e3c-paper);
}

/* --- leave confirmation --------------------------------------------------
   Native <dialog>, opened by e3c-leave-guard.js over unsaved changes. */

.e3c-dialog {
    max-width: min(420px, calc(100vw - 32px));
    padding: 26px 26px 22px;
    border: var(--e3c-rule);
    background: var(--e3c-paper);
    color: var(--e3c-ink);
}

.e3c-dialog::backdrop { background: rgba(20, 20, 20, .45); }

.e3c-dialog__title {
    margin: 0 0 6px;
    font: 900 18px/1.2 var(--e3c-display);
    letter-spacing: -.01em;
}

.e3c-dialog__text {
    margin: 0;
    font: 400 14px/1.6 var(--e3c-body);
    color: var(--e3c-ink-70);
}

.e3c-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

/* Multi-line saved text in read mode keeps the writer's line breaks */
.e3c-fields__text { white-space: pre-line; }

/* --- step navigation -----------------------------------------------------
   Save sits with the forward/backward moves at the foot of a stage form.
   ------------------------------------------------------------------------ */

.e3c-stepnav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--e3c-ink-20);
}

/* Pushes Save and Continue away from a Previous link on the left. */
.e3c-stepnav__spacer { margin-left: auto; }

/* Secondary submit: same shape as the primary, unfilled. */
.e3c-panel .e3c-submit--ghost {
    background: none;
    color: var(--e3c-ink);
}

.e3c-panel .e3c-submit--ghost:hover {
    background: var(--e3c-ink);
    color: var(--e3c-paper);
}

/* Plain backwards link — deliberately not a button, since it neither
   submits nor validates. */
.e3c-steplink {
    display: inline-flex;
    align-items: center;
    padding: 12px 0;
    font: 700 11px var(--e3c-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
}

.e3c .e3c-steplink { color: var(--e3c-ink-70); }
.e3c .e3c-steplink:hover { color: var(--e3c-accent); }

.e3c-stepnav__note {
    flex-basis: 100%;
    margin: 0;
    font: 400 11px/1.5 var(--e3c-mono);
    color: var(--e3c-ink-56);
}

/* --- ledger table ------------------------------------------------------- */

/* Owner is omitted: every row belongs to the signed-in user, so the
   prototype's Owner column has no data behind it here. */
.e3c-ledger__head,
.e3c-ledger__row {
    display: grid;
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.3fr) 130px;
}

.e3c-ledger__head {
    border-bottom: var(--e3c-rule);
    font: 700 10.5px var(--e3c-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--e3c-ink-70);
}

.e3c-ledger__head > div { padding: 10px 16px; }
.e3c-ledger__head > div:first-child { padding-left: 30px; }
.e3c-ledger__head > div + div { border-left: 1px solid var(--e3c-ink-20); }

.e3c-ledger__row {
    border-bottom: 1px solid var(--e3c-ink-20);
    align-items: center;
    text-decoration: none;
    transition: background .1s ease;
}

.e3c .e3c-ledger__row        { color: var(--e3c-ink); }
.e3c .e3c-ledger__row:hover  { background: #e5e1d6; }

.e3c-ledger__idea {
    padding: 18px 16px 18px 30px;
    display: flex;
    gap: 14px;
    align-items: baseline;
    min-width: 0;
}

.e3c-ledger__n {
    font: 900 22px/1 var(--e3c-display);
    color: var(--e3c-ink);
}

.e3c-ledger__row:first-of-type .e3c-ledger__n { color: var(--e3c-accent); }

.e3c-ledger__title {
    display: block;
    font: 700 17px/1.25 var(--e3c-body);
    overflow-wrap: anywhere;
}

.e3c-ledger__stage {
    display: block;
    font: 400 12.5px/1.5 var(--e3c-body);
    color: var(--e3c-ink-70);
    margin-top: 3px;
}

.e3c-ledger__cell {
    padding: 18px 16px;
    border-left: 1px solid var(--e3c-ink-20);
    align-self: stretch;
    display: flex;
    align-items: center;
    font: 400 12.5px var(--e3c-body);
    color: var(--e3c-ink-70);
}

/* Five segments, one per derisk stage. */
.e3c-progress {
    display: flex;
    gap: 4px;
    width: 100%;
}

.e3c-progress__seg {
    flex: 1;
    height: 8px;
    background: var(--e3c-ink-20);
}

.e3c-progress__seg.is-done { background: var(--e3c-accent); }

.e3c-ledger__empty {
    padding: 34px 30px;
    border-bottom: 1px solid var(--e3c-ink-20);
    font: 400 14px/1.6 var(--e3c-body);
    color: var(--e3c-ink-70);
}

.e3c-ledger__empty p { margin: 0 0 18px; }
.e3c-ledger__empty p:last-child { margin-bottom: 0; }

/* Marks an idea that waits for review at the next meeting */
.e3c-ledger__tag {
    margin-left: 8px;
    font: 500 10.5px var(--e3c-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--e3c-accent);
}

/* --- dashboard ----------------------------------------------------------
   Action tiles in a row of four, then one block per list. The tiles share
   their borders like the ledger rows, so they read as one strip. */

.e3c-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: var(--e3c-rule);
}

.e3c-tile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 30px 28px;
    text-decoration: none;
    transition: background .1s ease;
}

.e3c-tile + .e3c-tile { border-left: 1px solid var(--e3c-ink-20); }

.e3c .e3c-tile       { color: var(--e3c-ink); }
.e3c a.e3c-tile:hover { background: #e5e1d6; color: var(--e3c-ink); }

.e3c a.e3c-tile:focus-visible {
    outline: 2px solid var(--e3c-accent);
    outline-offset: -2px;
}

.e3c-tile.is-disabled { color: var(--e3c-ink-56); cursor: default; }

.e3c-tile__eyebrow,
.e3c-tile__tag {
    font: 500 10.5px var(--e3c-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--e3c-ink-70);
}

.e3c-tile__tag { margin-left: 6px; color: var(--e3c-accent); }

.e3c-tile__title { font: 900 22px/1.1 var(--e3c-display); letter-spacing: -.02em; }

.e3c-tile__text { font: 400 13px/1.55 var(--e3c-body); color: var(--e3c-ink-70); }

.e3c-tile.is-disabled .e3c-tile__title,
.e3c-tile.is-disabled .e3c-tile__text { color: var(--e3c-ink-56); }

.e3c-tile__count {
    font: 900 46px/.95 var(--e3c-display);
    letter-spacing: -.035em;
    color: var(--e3c-accent);
}

.e3c-tile__cta {
    margin-top: auto;
    padding-top: 6px;
    font: 700 12px var(--e3c-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--e3c-accent);
}

/* The heading over the user's ideas on the dashboard. (Not .e3c-block: that
   is the landing page's two-column prose section.) */
.e3c-dashlist__head { padding: 26px 30px 14px; }

.e3c-dashlist__title {
    margin: 0;
    font: 900 26px/1 var(--e3c-display);
    letter-spacing: -.02em;
    text-transform: uppercase;
}

/* What's next (/ideas/review): idea and owner, date asked, admin action */
.e3c-queue__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px auto;
    align-items: center;
    border-bottom: 1px solid var(--e3c-ink-20);
}

.e3c-queue__idea {
    display: block;
    padding: 18px 16px 18px 30px;
    text-decoration: none;
    min-width: 0;
}

.e3c .e3c-queue__idea       { color: var(--e3c-ink); }
.e3c .e3c-queue__idea:hover { color: var(--e3c-accent); }

.e3c-queue__action { padding: 0 30px 0 16px; }

@media (max-width: 999px) {
    .e3c-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .e3c-tile:nth-child(3) { border-left: none; }
    .e3c-tile:nth-child(n+3) { border-top: 1px solid var(--e3c-ink-20); }
}

@media (max-width: 559px) {
    .e3c-tiles { grid-template-columns: minmax(0, 1fr); }
    .e3c-tile + .e3c-tile { border-left: none; border-top: 1px solid var(--e3c-ink-20); }

    .e3c-queue__row { grid-template-columns: minmax(0, 1fr); padding-bottom: 12px; }
    .e3c-queue__row .e3c-ledger__cell { border-left: none; padding: 0 30px 10px; }
    .e3c-queue__action { padding: 0 30px; }
}

/* The current version's date and feedback, under the stage's fields */
/* The stage's fields with the current version's date flush right, lined up
   with the dates in the timeline. Baseline alignment puts the date level
   with the first label ("Idea name"), in read and edit mode alike. */
.e3c-current-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 24px;
}

.e3c-current-row > :first-child { flex: 1 1 280px; min-width: 0; }

.e3c-current { max-width: 640px; }

/* --- stage timeline ------------------------------------------------------
   One entry per saved revision, newest first. Each entry hangs off a ring
   on the left, with a rule running down to the next ring. */

.e3c-timeline {
    margin-top: 34px;
    padding-top: 6px;
    border-top: 1px solid var(--e3c-ink-20);
}

/* Collapsed by default. The summary is the full-width row with the heading,
   the count and the +/− marker borrowed from the process accordion. */
.e3c-timeline__summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    cursor: pointer;
    list-style: none;
}

.e3c-timeline__summary::-webkit-details-marker { display: none; }
.e3c-timeline__summary::marker { content: ''; }

.e3c-timeline__summary:focus-visible {
    outline: 2px solid var(--e3c-accent);
    outline-offset: 2px;
}

.e3c-panel .e3c-timeline__summary h3 { margin: 0; }

.e3c-timeline__count {
    font: 500 10.5px var(--e3c-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--e3c-ink-70);
}

/* Open: the vertical stroke collapses, leaving a minus. */
.e3c-timeline[open] .e3c-stage__marker::after {
    transform: translateX(-50%) scaleY(0);
    opacity: 0;
}

/* Animated open/close where the browser can transition the details content;
   elsewhere it simply opens and closes. */
.e3c-timeline { interpolate-size: allow-keywords; }

.e3c-timeline::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size .26s cubic-bezier(.25,.6,.3,1),
                content-visibility .26s allow-discrete;
}

.e3c-timeline[open]::details-content { block-size: auto; }

@media (prefers-reduced-motion: reduce) {
    .e3c-timeline::details-content { transition: none; }
}

.e3c-timeline__list {
    margin: 0;
    padding: 0 0 0 32px;
    list-style: none;
}

.e3c-timeline__entry,
.e3c-timeline__end { position: relative; }

.e3c-timeline__entry { padding-bottom: 28px; }

/* the ring */
.e3c-timeline__entry::before,
.e3c-timeline__end::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 1px;
    width: 14px;
    height: 14px;
    border: 2px solid var(--e3c-ink);
    border-radius: 50%;
    background: var(--e3c-paper);
}

/* the rule down to the next ring */
.e3c-timeline__entry::after {
    content: '';
    position: absolute;
    left: -26px;
    top: 22px;
    bottom: 6px;
    width: 2px;
    background: var(--e3c-ink);
}

.e3c-timeline__end { height: 16px; }

.e3c-timeline__head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.e3c-timeline__title {
    font: 700 13px var(--e3c-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.e3c-timeline__date {
    margin-left: auto;
    font: 500 10.5px var(--e3c-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--e3c-ink-70);
}

.e3c-timeline__text {
    margin: 8px 0 0;
    font: 400 14px/1.6 var(--e3c-body);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

@media (max-width: 739px) {
    .e3c-ledger__head { display: none; }

    .e3c-ledger__row {
        grid-template-columns: minmax(0, 1fr);
        padding-bottom: 8px;
    }

    .e3c-ledger__cell {
        border-left: none;
        padding: 0 30px 10px;
    }
}

/* --- generic app content ------------------------------------------------ */

.e3c-panel { padding: 30px; }

.e3c-panel h2 {
    margin: 28px 0 10px;
    font: 900 clamp(20px, 2.2vw, 26px)/1.1 var(--e3c-display);
    letter-spacing: -.02em;
    text-transform: uppercase;
}

.e3c-panel h2:first-child { margin-top: 0; }

.e3c-panel h3 {
    margin: 22px 0 8px;
    font: 700 13px var(--e3c-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.e3c-panel p {
    margin: 0 0 14px;
    max-width: 72ch;
    font: 400 15px/1.7 var(--e3c-body);
    text-wrap: pretty;
}

.e3c-panel img { max-width: 100%; height: auto; }

.e3c-panel ul { margin: 0 0 14px; padding-left: 20px; }

.e3c-panel li {
    font: 400 15px/1.7 var(--e3c-body);
    margin-bottom: 4px;
}

.e3c-panel textarea,
.e3c-panel input[type="text"],
.e3c-panel input[type="email"] {
    width: 100%;
    max-width: 720px;
    border: var(--e3c-rule);
    background: #fff;
    padding: 12px 14px;
    font: 400 14px/1.6 var(--e3c-body);
    color: var(--e3c-ink);
}

.e3c-panel textarea:focus,
.e3c-panel input:focus {
    outline: 2px solid var(--e3c-accent);
    outline-offset: -2px;
}

.e3c-panel button,
.e3c-panel input[type="submit"] {
    border: var(--e3c-rule);
    background: var(--e3c-ink);
    color: var(--e3c-paper);
    padding: 12px 20px;
    font: 700 12px var(--e3c-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}

.e3c-panel button:hover,
.e3c-panel input[type="submit"]:hover {
    background: var(--e3c-accent);
    color: var(--e3c-ink);
}

.e3c-panel button:disabled { opacity: .5; cursor: default; }

/* --- sharing and feedback -------------------------------------------------
   The share dialog (share.dialog.twig.html), the feedback listed under a
   revision (feedback.twig.html) and the public page a recipient answers on
   (idea.feedback.form.twig.html). */

.e3c-dialog--share { width: min(520px, calc(100vw - 32px)); max-width: none; }

.e3c-dialog--share .e3c-dialog__text { margin-bottom: 20px; }

.e3c-panel .e3c-dialog__error {
    margin: 0;
    font: 500 13px/1.5 var(--e3c-body);
    color: var(--e3c-accent);
}

/* A heading with its own actions, inside a panel (idea summary) */
.e3c-panelhead--section { margin: 28px 0 10px; }
.e3c-panelhead--section h2,
.e3c-panelhead--section h3 { margin: 0; }

/* A form holding a single button among other actions: the button takes part
   in the surrounding flex row as if the form were not there */
.e3c-inlineform { display: contents; }

/* Who asked for the review and since when (review.view.twig.html) */
.e3c-review__meta {
    margin: 0 0 8px;
    font: 500 10.5px var(--e3c-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--e3c-ink-70);
}

.e3c-panel .e3c-feedback {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    border-left: 2px solid var(--e3c-ink-20);
}

.e3c-panel .e3c-feedback__item {
    margin: 0;
    padding: 0 0 12px 14px;
}

.e3c-panel .e3c-feedback__item:last-child { padding-bottom: 0; }

.e3c-feedback__meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 12px;
    font: 500 10.5px var(--e3c-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--e3c-ink-70);
}

.e3c-feedback__who {
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: none;
    color: var(--e3c-ink);
    overflow-wrap: anywhere;
}

.e3c-panel .e3c-feedback__text {
    margin: 4px 0 0;
    font: 400 14px/1.6 var(--e3c-body);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.e3c-panel .is-pending .e3c-feedback__text { color: var(--e3c-ink-56); }

/* The public feedback page is one column of reading text */
.e3c-panel--narrow { max-width: 760px; }
.e3c-panel--narrow form { margin-top: 24px; }
