/* ==========================================================================
   Dead Man's Switch — Design System
   Dark default, light via @media (prefers-color-scheme: light).
   Monochrome. Serif brand (EB Garamond), grotesque body (Public Sans),
   mono for numbers/meta (IBM Plex Mono).
   ========================================================================== */

/* ============ RESET ============ */

html {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body, div, dl, dt, dd, ul, ol, li,
h1, h2, h3, h4, h5, h6,
pre, code, form, fieldset, legend,
input, textarea, p, blockquote, th, td {
    margin: 0;
    padding: 0;
}

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

a {
    color: inherit;
    text-decoration: none;
    outline: none;
}

a:hover {
    opacity: .75;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

fieldset, img {
    border: 0;
}

address, caption, cite, code, dfn, em, strong, th, var {
    font-style: normal;
    font-weight: normal;
}

li {
    list-style: none;
}

caption, th {
    text-align: left;
}

q::before, q::after {
    content: "";
}

abbr, acronym {
    border: 0;
    font-variant: normal;
}

sup { vertical-align: text-top; }
sub { vertical-align: text-bottom; }

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}

/* ============ CUSTOM PROPERTIES (dark default) ============ */

:root {
    --bg: #0b0c0e;
    --surface: #121417;
    --raised: #181b1f;
    --ink: #f3f2ee;
    --soft: #9a968d;
    --faint: #615e58;
    --line: rgba(255, 255, 255, .09);
    --line2: rgba(255, 255, 255, .17);
    --line3: rgba(255, 255, 255, .32);

    --font-serif: 'EB Garamond', Georgia, Times, serif;
    --font-sans: 'Public Sans', Helvetica, Arial, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Bitstream Vera Sans Mono', Monaco, monospace;

    --radius-sm: 11px;
    --radius-md: 14px;
    --radius-lg: 16px;
    --radius-btn: 12px;
}

/* ============ LIGHT MODE ============ */

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f6f5f1;
        --surface: #ffffff;
        --raised: #fbfaf7;
        --ink: #17150f;
        --soft: #605b52;
        --faint: #948e83;
        --line: rgba(0, 0, 0, .09);
        --line2: rgba(0, 0, 0, .16);
        --line3: rgba(0, 0, 0, .30);
    }
}

/* ============ BASE ============ */

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
}

/* ============ TYPOGRAPHY ============ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-variant: small-caps;
    font-weight: 600;
    line-height: 1.15;
}

h1 { font-size: 2.2em; letter-spacing: .05em; text-align: center; }
h2 { font-size: 1.7em; letter-spacing: .04em; text-align: center; margin: 0.3em 0 0.5em; }
h3 { font-size: 1.25em; letter-spacing: .02em; margin: 0.2em 0; }
h4 { font-size: 1.1em; }

strong, b { font-weight: 700; }
em, i { font-style: italic; }

p {
    margin: 0.5em 0;
    text-indent: 0;
}

/* inline links: ink underline */
a[href]:not(.button):not(.plan-btn):not(.nav-link):not(.site-wordmark a):not(.footer-text a) {
    color: var(--ink);
    border-bottom: 1px solid var(--line3);
    padding-bottom: 1px;
}

a[href]:not(.button):not(.plan-btn):not(.nav-link):not(.site-wordmark a):not(.footer-text a):hover {
    opacity: .75;
}

abbr, acronym {
    border-bottom: 1px dotted var(--soft);
}

code, kbd, pre, samp, var {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

hr {
    margin: 1.5rem auto;
    height: auto;
    color: var(--line2);
    text-align: center;
    display: block;
    font-weight: bold;
    font-size: 130%;
    border: 0;
    opacity: .6;
}

hr::before {
    content: "···";
    letter-spacing: 1em;
}

.content-area ul > li,
.content-area ol > li {
    list-style: circle;
    margin-left: 20px;
}

blockquote {
    font-family: var(--font-serif);
}

/* ============ HEADER / NAVIGATION ============ */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 56px;
    border-bottom: 1px solid var(--line);
    position: relative;
    background: var(--bg);
}

.site-wordmark {
    font-family: var(--font-serif);
    font-variant: small-caps;
    letter-spacing: .1em;
    font-size: 25px;
    font-weight: 600;
    z-index: 2;
}

.site-wordmark a {
    color: var(--ink);
}

.site-wordmark a:hover {
    opacity: .75;
}

/* nav links */
.nav-menu {
    display: flex;
    gap: 26px;
    align-items: center;
}

.nav-menu ul {
    display: flex;
    gap: 26px;
    align-items: center;
}

.nav-menu li {
    list-style: none;
    margin: 0;
}

.nav-link {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 21px;
    color: var(--soft);
}

.nav-link:hover {
    opacity: .75;
}

.nav-link.active {
    color: var(--ink);
    border-bottom: 1px solid var(--line3);
    padding-bottom: 2px;
}

/* ---------- mobile hamburger ---------- */

.nav-toggle-label {
    display: none;
}

/* nav-toggle: visually hidden but keyboard-focusable */
.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* focus-visible outline on the hamburger label */
.nav-toggle:focus-visible + .nav-toggle-label {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}

@media (max-width: 768px) {
    .site-header {
        padding: 12px 22px;
    }

    .site-wordmark {
        font-size: 19px;
        letter-spacing: .08em;
    }

    /* hamburger icon (stacked bars) */
    .nav-toggle-label {
        display: flex;
        flex-direction: column;
        gap: 4.5px;
        width: 20px;
        cursor: pointer;
        z-index: 3;
    }

    .nav-toggle-label span {
        display: block;
        height: 1.5px;
        background: var(--ink);
        border-radius: 2px;
        transition: opacity .2s, transform .2s ease;
    }

    .nav-toggle-label span:nth-child(2) {
        width: 64%;
    }

    /* hide nav by default on mobile */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        padding: 14px 22px 20px;
        flex-direction: column;
        align-items: flex-start;
        z-index: 2;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        width: 100%;
    }

    .nav-menu li {
        width: 100%;
    }

    /* full-width tap target: the whole row is clickable, not just the words */
    .nav-link {
        display: block;
        width: 100%;
        padding: 10px 0;
        font-size: 20px;
    }

    /* show nav when toggle is checked */
    .nav-toggle:checked ~ .nav-menu {
        display: flex;
    }

    /* animate hamburger when open: top bar rotates */
    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
        transform: translateY(3px) rotate(45deg);
        width: 100%;
    }

    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
        transform: translateY(-3px) rotate(-45deg);
        width: 100%;
    }
}

/* ============ FOOTER ============ */

.footer-text {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--faint);
    letter-spacing: .06em;
    text-align: center;
    margin: 50px 0 24px;
    padding: 0 24px;
}

.footer-text a {
    color: var(--faint);
    border-bottom: 1px solid var(--line);
}

.footer-text a:hover {
    color: var(--soft);
    opacity: 1;
}

/* ============ FLASH MESSAGES (Django contrib.messages) ============ */

ul.messages {
    list-style: none;
    margin: 0 auto;
    padding: 18px 24px 0;
    max-width: 960px;
}

ul.messages > li {
    border: 1px solid var(--line2);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 14px 18px;
    margin-bottom: 10px;
    font-size: 17px;
    line-height: 1.6;
    list-style: none;
    text-indent: 0;
}

ul.messages > li.success {
    border-color: var(--line3);
}

ul.messages > li.error {
    border-color: var(--line3);
}

/* ============ SHARED COMPONENTS ============ */

/* --- buttons --- */

button,
a.button,
input[type="submit"],
input[type="button"] {
    display: inline-block;
    cursor: pointer;
    background: var(--ink);
    color: var(--bg);
    border: none;
    border-radius: var(--radius-btn);
    padding: 15px 32px;
    font-family: var(--font-mono);
    font-size: 15px;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.2;
    margin: 10px 5px 15px 5px;
    transition: opacity .15s ease;
}

button:hover,
a.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    opacity: .85;
}

/* secondary / outline buttons */
button.secondary,
a.button.secondary,
input[type="submit"].secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line2);
}

button.secondary:hover,
a.button.secondary:hover,
input[type="submit"].secondary:hover {
    border-color: var(--line3);
}

/* --- form inputs --- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea,
select {
    background: var(--raised);
    border: 1px solid var(--line2);
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    font-size: 17px;
    color: var(--ink);
    font-family: var(--font-sans);
    width: 100%;
    transition: border-color .15s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--line3);
    box-shadow: 0 0 0 2px var(--line);
}

input::placeholder,
textarea::placeholder {
    color: var(--soft);
}

.disabled-field {
    background: var(--raised);
    color: var(--faint);
    cursor: not-allowed;
    border-color: var(--line);
}

/* --- flash/push close button reset --- */

.close-button {
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    letter-spacing: inherit;
    text-transform: none;
    font-weight: inherit;
    line-height: 1;
    border-radius: 0;
}

.close-button:hover {
    opacity: .75;
}

.close-button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* --- cards / panels --- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.card-raised {
    background: var(--raised);
    border: 1px solid var(--line2);
    border-radius: var(--radius-md);
    padding: 20px;
}

/* --- section labels --- */

.section-label {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--soft);
    margin: 0 0 8px;
    display: block;
}

.section-label-small {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
    margin: 0 0 8px;
    display: block;
}

/* --- tables (shared styles for later tickets) --- */

table.data-table {
    width: 100%;
    border: 1px solid var(--line2);
    border-radius: var(--radius-md);
    overflow: hidden;
}

table.data-table th {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .14em;
    color: var(--faint);
    text-transform: uppercase;
    padding: 13px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

table.data-table td {
    padding: 13px 16px;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
}

table.data-table tr:last-child td {
    border-bottom: none;
}

/* ============ FORM TABLES (legacy pattern) ============ */

.formtable {
    margin: 0 auto;
    max-width: 640px;
}

.formtable table {
    width: 100%;
}

.formtable th {
    text-align: right;
    width: 2%;
    padding-right: 1em;
    font-weight: bold;
    vertical-align: middle;
    color: var(--soft);
    font-size: 17px;
}

.formtable td {
    width: 10%;
    padding: 6px 0;
}

.formtable input[type="text"],
.formtable input[type="email"],
.formtable input[type="password"] {
    width: 100%;
    box-sizing: border-box;
}

.formtable textarea {
    width: 100%;
    box-sizing: border-box;
}



/* ============ UTILITIES ============ */

.center {
    text-align: center;
}

.single {
    text-align: center;
    text-indent: 0;
}

.boxdiv {
    margin: 1em 2em;
    padding: 0;
    text-indent: 0;
}



/* ============ ERROR STYLES ============ */

.error {
    color: var(--ink);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 90%;
}

.errorlist {
    list-style: none;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 15px;
    color: var(--ink);
    margin-bottom: 0.5em;
}

td:has(.errorlist) input,
td:has(.errorlist) textarea,
td:has(.errorlist) select {
    border: 1px solid var(--line3);
}

td:has(.errorlist) input:focus,
td:has(.errorlist) textarea:focus,
td:has(.errorlist) select:focus {
    outline: none;
    border-color: var(--line3);
    box-shadow: 0 0 0 1px var(--line3);
}

/* ============ PRICING PAGE ============ */

.pricing-intro {
    font-size: 16px;
    color: var(--soft);
    margin: 11px 0 28px;
    line-height: 1.55;
    text-align: center;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
    max-width: 960px;
    margin: 0 auto;
}

.plan-card {
    background: var(--surface);
    border: 1px solid var(--line2);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.plan-card-premium {
    border-width: 1.5px;
    border-color: var(--line3);
    background: var(--surface);
}

.plan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-card-name {
    font-family: var(--font-serif);
    font-size: 24px;
    margin: 0;
}

.plan-card-price {
    font-family: var(--font-serif);
    font-size: 38px;
    line-height: 1;
    font-weight: 600;
    margin: 14px 0 0;
}

/* Yearly / One-off toggle */
.plan-toggle {
    display: flex;
    gap: 3px;
    background: var(--raised);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 3px;
}

.plan-toggle-btn {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--soft);
    border-radius: 6px;
    padding: 5px 11px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
}

.plan-toggle-btn.active {
    background: var(--ink);
    color: var(--bg);
}

.plan-toggle-btn:hover:not(.active) {
    color: var(--ink);
}

/* Feature rows */
.plan-card-features {
    display: flex;
    flex-direction: column;
    margin-top: 18px;
    border-top: 1px solid var(--line);
}

.feature-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
}

.feature-row:last-child {
    border-bottom: none;
}

.feature-label {
    color: var(--soft);
}

.feature-value {
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--ink);
    text-align: right;
}

/* Plan buttons */
.plan-card-buttons {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan-btn {
    display: block;
    width: 100%;
    text-align: center;
    border-radius: 10px;
    padding: 14px;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: .12em;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

.plan-btn-outline {
    border: 1px solid var(--line2);
    color: var(--soft);
    background: transparent;
}

.plan-btn-outline:hover {
    border-color: var(--line3);
    color: var(--ink);
}

.plan-btn-primary {
    background: var(--ink);
    color: var(--bg);
    border: none;
}

.plan-btn-primary:hover {
    opacity: .85;
}

.plan-btn-secondary {
    background: transparent;
    border: 1px solid var(--line2);
    color: var(--ink);
}

.plan-btn-secondary:hover {
    border-color: var(--line3);
    opacity: 1;
}

.plan-btn-current {
    background: var(--ink);
    color: var(--bg);
    cursor: default;
    border: none;
}

/* Pricing mobile */
@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5em;
    }
}

/* ============ CONTENT AREA ============ */

.content-area {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px 24px;
}

/* ============ RECIPIENTS NOTE (message_write.html) ============ */

.recipients-note {
    text-align: center;
    font-size: 17px;
    color: var(--soft);
    line-height: 1.7;
}

/* ============ MOBILE RESPONSIVE ============ */

@media (max-width: 768px) {
    body {
        font-size: 17px;
    }

    h1 { font-size: 1.8em; }
    h2 { font-size: 1.4em; }

    .site-header {
        padding: 12px 22px;
    }

    .formtable,
    .formtable tbody,
    .formtable tr,
    .formtable th,
    .formtable td {
        display: block;
        width: 100%;
        text-align: left;
    }

    .formtable th {
        padding-right: 0;
        padding-bottom: 0.5em;
    }

    .formtable input[type="text"],
    .formtable input[type="email"],
    .formtable input[type="password"],
    .formtable textarea {
        width: 100%;
        box-sizing: border-box;
    }

    button,
    a.button,
    input[type="submit"] {
        font-size: 14px;
        padding: 14px 24px;
    }
}

@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5em;
    }
}

/* ============ MESSAGE LIST PAGE ============ */

.push-banner {
    position: relative;
    padding-right: 48px;
    margin-bottom: 32px;
    font-size: 17px;
    color: var(--soft);
    line-height: 1.7;
}

.push-banner .close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 22px;
    cursor: pointer;
    color: var(--faint);
}

.checked-in-panel {
    margin-bottom: 32px;
}

.checked-in-panel .welcome-line {
    font-family: var(--font-serif);
    font-size: 23px;
    margin: 0 0 12px;
}

.checked-in-panel .checkin-copy {
    font-size: 17px;
    color: var(--soft);
    line-height: 1.7;
    margin: 0;
    max-width: 720px;
}

.checked-in-panel .checkin-copy a {
    color: var(--ink);
    border-bottom: 1px solid var(--line3);
    padding-bottom: 1px;
}

/* Message list grid */

.message-list {
    border: 1px solid var(--line2);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 28px;
}

.message-list-header {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1.3fr;
    padding: 13px 26px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .14em;
    color: var(--faint);
    text-transform: uppercase;
}

.message-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1.3fr;
    padding: 20px 26px;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.message-row:last-child {
    border-bottom: none;
}

.message-row .msg-recipients {
    font-size: 17px;
}

.message-row .msg-subject {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 21px;
}

.message-row .msg-intervals {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--soft);
}

.message-row .msg-actions {
    text-align: right;
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: .06em;
    color: var(--soft);
}

.message-row .msg-actions .action-edit {
    color: var(--ink);
    border-bottom: 1px solid var(--line3);
    padding-bottom: 1px;
}

.message-row .msg-actions .action-delete {
    border-bottom: 1px solid var(--line2);
    padding-bottom: 1px;
    color: var(--soft);
}

.message-row .msg-actions .action-delete:hover {
    color: var(--ink);
}

.message-empty {
    padding: 32px 26px;
    text-align: center;
    font-style: italic;
    font-family: var(--font-serif);
    color: var(--soft);
}

/* Write button area */

.write-button-area {
    text-align: center;
    margin-bottom: 44px;
}

/* Premium pitch card */

.premium-pitch {
    border: 1px solid var(--line2);
    border-radius: var(--radius-lg);
    padding: 44px 64px;
    text-align: center;
    margin-bottom: 0;
}

.premium-pitch .pitch-heading {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 23px;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 720px;
}

.premium-pitch .pitch-features {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 20px;
    color: var(--soft);
    line-height: 2;
    margin-top: 22px;
}

.premium-pitch .pitch-upgrade {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 21px;
    margin-top: 22px;
}

.premium-pitch .pitch-upgrade a {
    color: var(--ink);
    border-bottom: 1px solid var(--line3);
    padding-bottom: 1px;
}

.premium-pitch .pitch-dots {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin: 30px 0;
}

.premium-pitch .pitch-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--faint);
}

.premium-pitch .pitch-referral {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 21px;
    margin: 0;
}

.premium-pitch .pitch-link-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 21px;
}

.premium-pitch .pitch-link-row a {
    color: var(--ink);
    border-bottom: 1px solid var(--line3);
    padding-bottom: 1px;
}

.premium-pitch .copy-icon {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: var(--soft);
    vertical-align: middle;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    letter-spacing: inherit;
    text-transform: none;
    font-weight: inherit;
    line-height: 1;
    border-radius: 0;
}

.premium-pitch .copy-icon:hover {
    color: var(--ink);
}

.premium-pitch .copy-icon:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* ============ WRITE / EDIT MESSAGE PAGE ============ */

.write-heading {
    text-align: center;
    font-family: var(--font-serif);
    font-variant: small-caps;
    letter-spacing: .05em;
    font-size: 36px;
    font-weight: 600;
    margin: 0 0 8px;
}

.write-subtitle {
    text-align: center;
    font-size: 17px;
    color: var(--soft);
    margin: 0 0 14px;
}

.write-subtitle a {
    color: var(--ink);
    border-bottom: 1px solid var(--line3);
    padding-bottom: 1px;
}

.write-intro {
    text-align: center;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 19px;
    color: var(--soft);
    margin: 0 0 40px;
}

/* Two-column write layout */

.write-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
    margin-top: 0;
}

.write-main {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.write-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Field groups */

.field-group {
    display: flex;
    flex-direction: column;
}

.field-group .field-label {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--soft);
    margin: 0 0 8px;
    display: block;
}

.field-group input[type="text"],
.field-group input[type="email"],
.field-group textarea,
.field-group select {
    width: 100%;
}

.field-group textarea {
    min-height: 280px;
    resize: vertical;
}

.field-group .errorlist {
    margin-top: 4px;
}

/* Recipients field (free users) */

.recipients-field-wrapper {
    position: relative;
}

.recipients-field-wrapper input.disabled-field {
    padding-right: 40px;
}

.recipients-lock-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    cursor: not-allowed;
    color: var(--faint);
}

/* Intervals note */

.intervals-note {
    font-size: 15px;
    color: var(--faint);
    margin: 8px 0 0;
    line-height: 1.5;
}

.intervals-note a {
    color: var(--ink);
    border-bottom: 1px solid var(--line3);
    padding-bottom: 1px;
}

/* WHAT HAPPENS panel */

.what-happens {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 15px 16px;
    background: var(--surface);
}

.what-happens .wh-label {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .14em;
    color: var(--faint);
    margin: 0 0 9px;
}

.what-happens .wh-text {
    font-size: 15.5px;
    color: var(--soft);
    line-height: 1.7;
    margin: 0;
}

.what-happens .wh-text b {
    color: var(--ink);
    font-weight: 600;
}

/* Suicide prevention note — bordered panel */

.suicide-note {
    border: 1px solid var(--line2);
    border-radius: var(--radius-md);
    padding: 16px;
    background: var(--surface);
    font-size: 15px;
    color: var(--soft);
    margin: 40px 0 0;
    line-height: 1.6;
}

.suicide-note a {
    color: var(--ink);
    border-bottom: 1px solid var(--line3);
    padding-bottom: 1px;
}

/* Upgrade warning for edit page */

.edit-warning {
    text-align: center;
    font-size: 17px;
    color: var(--soft);
    line-height: 1.7;
    margin: 0 0 14px;
}

.edit-warning a {
    color: var(--ink);
    border-bottom: 1px solid var(--line3);
    padding-bottom: 1px;
}

/* ============ MESSAGE SHOW / DELETE ============ */

.message-detail-card {
    border: 1px solid var(--line2);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    max-width: 720px;
    margin: 0 auto;
}

.message-detail-card .detail-row {
    margin-bottom: 22px;
}

.message-detail-card .detail-row:last-child {
    margin-bottom: 0;
}

.message-detail-card .detail-label {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--soft);
    margin: 0 0 6px;
}

.message-detail-card .detail-value {
    font-size: 17px;
    line-height: 1.6;
}

.message-detail-card .detail-value.body-text {
    font-family: var(--font-serif);
    font-style: italic;
}

.message-detail-card .detail-actions {
    text-align: center;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

/* ============ MOBILE RESPONSIVE (message pages) ============ */

@media (max-width: 860px) {
    .write-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .message-list-header,
    .message-row {
        grid-template-columns: 1fr 1fr auto;
        gap: 8px;
        padding: 14px 18px;
    }

    .message-list-header span:nth-child(3),
    .message-row .msg-intervals {
        display: none;
    }

    .premium-pitch {
        padding: 28px 24px;
    }

    .premium-pitch .pitch-heading {
        font-size: 19px;
    }

    .premium-pitch .pitch-features {
        font-size: 17px;
    }

    .premium-pitch .pitch-upgrade,
    .premium-pitch .pitch-referral,
    .premium-pitch .pitch-link-row {
        font-size: 18px;
    }

    .checked-in-panel .welcome-line {
        font-size: 20px;
    }

    .write-heading {
        font-size: 28px;
    }
}

/* ============ LANDING PAGE ============ */

.landing-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 0 24px;
}

.landing-title {
    font-family: var(--font-serif);
    font-variant: small-caps;
    letter-spacing: .05em;
    font-weight: 600;
    font-size: 66px;
    line-height: 1;
    margin: 40px 0 20px;
    text-align: center;
}

.landing-section {
    border-top: 1px solid var(--line);
    padding-top: 22px;
}

.landing-section + .landing-section {
    margin-top: 20px;
}

.landing-section h2 {
    font-family: var(--font-serif);
    font-variant: small-caps;
    letter-spacing: .02em;
    font-weight: 600;
    font-size: 36px;
    margin: 0;
    text-align: center;
}

.landing-section p {
    font-size: 18px;
    line-height: 1.75;
    color: var(--soft);
    margin: 14px 0 0;
}

.landing-section p strong {
    color: var(--ink);
    font-weight: 700;
}

.landing-section p em {
    color: var(--ink);
}

.landing-cta {
    text-align: center;
    /* bottom margin needed: the next .landing-section's border-top otherwise
       sits flush against the button (the section+section gap rule doesn't
       apply when this div is between sections) */
    margin: 38px 0;
}

.landing-cta a.button {
    display: inline-block;
    background: var(--ink);
    color: var(--bg);
    border-radius: var(--radius-btn);
    padding: 17px 40px;
    font-family: var(--font-mono);
    font-size: 16px;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    margin: 0;
}

.landing-cta a.button:hover {
    opacity: .85;
}

.landing-badge {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.landing-badge img {
    width: 150px;
    height: auto;
}

/* Mobile */
@media (max-width: 768px) {
    .landing-title {
        font-size: 40px;
        letter-spacing: .04em;
        margin: 20px 0 16px;
    }

    .landing-section h2 {
        font-size: 26px;
    }

    .landing-section p {
        font-size: 16px;
        line-height: 1.7;
    }

    .landing-cta {
        margin: 30px 0;
    }

    .landing-cta a.button {
        width: 100%;
        text-align: center;
        padding: 16px;
        font-size: 15px;
    }
}

/* ============ ACCOUNT PAGE ============ */

.account-section {
    margin-bottom: 28px;
}

.account-section:last-child {
    margin-bottom: 0;
}

.account-section .section-label {
    margin-bottom: 10px;
}

/* Card holding each section's rows */
.account-card {
    border: 1px solid var(--line2);
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* Individual rows inside a card */
.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    gap: 14px;
}

.account-row.no-border {
    border-bottom: none;
}

.account-row-body {
    flex: 1;
    min-width: 0;
}

.account-row-title {
    font-size: 17px;
    display: block;
}

.account-row-detail {
    font-size: 15px;
    color: var(--soft);
    display: block;
    margin-top: 2px;
}

.account-row-helper {
    font-size: 15px;
    color: var(--soft);
    font-style: italic;
    line-height: 1.55;
    margin: 6px 0 0;
}

.account-row-warning {
    font-size: 15px;
    color: var(--soft);
    font-style: italic;
    line-height: 1.55;
    margin: 4px 0 0;
}

.account-row-status {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--faint);
    margin-left: 10px;
}

.account-row-badge {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .1em;
    color: var(--faint);
    display: block;
    margin-top: 2px;
}

.account-row-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.account-row-actions .button {
    margin: 0;
    padding: 9px 14px;
    font-size: 13px;
    white-space: nowrap;
}

.account-row .button {
    margin: 0;
    padding: 9px 14px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Hardware keys sub-section */
.account-keys-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.account-keys-row > .account-row-title {
    flex-shrink: 0;
}

.account-keys-table {
    margin: 0;
    width: 100%;
}

.account-keys-table td form {
    display: inline;
}

.account-keys-table td button {
    margin: 0;
    padding: 6px 12px;
    font-size: 13px;
}

.account-keys-table td a[href]:not(.button) {
    font-size: 15px;
}

.account-keys-table td input[type="text"] {
    width: auto;
    display: inline;
    padding: 6px 10px;
    font-size: 15px;
}

.account-keys-register {
    text-align: left;
}

.account-keys-register .button {
    margin: 0;
}

/* Gift codes */
.account-gift-intro p {
    font-size: 16px;
    color: var(--soft);
    line-height: 1.6;
    margin: 0;
}

.account-gift-row {
    align-items: flex-start;
}

.account-gift-link {
    word-break: break-all;
    font-size: 15px;
    font-family: var(--font-mono);
    color: var(--ink);
    border-bottom: 1px solid var(--line3);
    padding-bottom: 1px;
}

.account-gift-link:hover {
    opacity: .75;
}

/* Delete row */
.account-delete-row {
    align-items: center;
}

.account-delete-row p {
    font-size: 16px;
    color: var(--soft);
    line-height: 1.6;
    margin: 0;
}

.account-delete-row form {
    margin: 0;
}

.account-delete-row .button {
    margin: 0;
}

/* ============ LOG PAGE ============ */

.log-subtitle {
    text-align: center;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 17px;
    color: var(--soft);
    margin: 8px 0 22px;
}

.log-timeline {
    position: relative;
    padding-left: 28px;
    max-width: 720px;
    margin: 0 auto;
}

.log-date-group {
    margin-bottom: 4px;
}

.log-date-heading {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--faint);
    letter-spacing: .04em;
    margin: 0 0 10px;
    line-height: 15px;
}

.log-entry {
    position: relative;
    padding-bottom: 18px;
}

.log-entry::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: -18.25px;
    top: 11px;
    bottom: -11px;
    width: 1.5px;
    background: var(--line2);
}

/* The last entry in a date group reaches the next group's first dot. */
.log-date-group .log-entry:last-child::before {
    bottom: -40px;
}

.log-entry:last-child,
.log-entry.log-entry-last {
    padding-bottom: 0;
}

.log-entry.log-entry-last::before,
.log-date-group:last-child .log-entry:last-child::before {
    display: none;
}

/* Dot on the rail */
.log-dot {
    position: absolute;
    left: -25.5px;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 1.5px solid var(--line3);
    z-index: 1;
}

.log-dot-warn::after,
.log-dot-sent::after,
.log-dot-quiet::after {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

.log-dot-warn::after {
    content: "!";
}

.log-dot-sent::after {
    content: "†";
}

.log-dot-quiet::after {
    content: "✓";
}

.log-entry-body {
    min-height: 20px;
}

.log-entry-message {
    font-size: 16.5px;
    margin: 0;
    line-height: 1.5;
}

.log-empty {
    text-align: center;
    padding: 32px 0;
}

.log-empty p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 19px;
    color: var(--soft);
}

/* ============ ACCOUNT + LOG MOBILE ============ */

@media (max-width: 768px) {
    .account-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .account-row .button {
        width: 100%;
        text-align: center;
    }

    .account-row-actions {
        width: 100%;
    }

    .account-row-actions .button {
        flex: 1;
        text-align: center;
    }

    .account-keys-table {
        display: block;
        overflow-x: auto;
    }

    .account-keys-table th,
    .account-keys-table td {
        white-space: nowrap;
        padding: 8px 12px;
    }

    .log-timeline {
        padding-left: 24px;
    }

    .log-entry::before {
        left: -16.25px;
        top: 9.5px;
        bottom: -9.5px;
    }

    .log-date-group .log-entry:last-child::before {
        bottom: -38.5px;
    }

    .log-dot {
        left: -22.5px;
        top: 2.5px;
        width: 14px;
        height: 14px;
    }

    .log-dot-warn::after,
    .log-dot-sent::after,
    .log-dot-quiet::after {
        font-size: 10px;
    }

    .log-entry-message {
        font-size: 15.5px;
    }
}

/* ============ LOGIN PAGE ============ */

.login-page {
    max-width: 440px;
    margin: 0 auto;
    padding: 40px 26px 24px;
}

.login-wordmark {
    font-family: var(--font-serif);
    font-variant: small-caps;
    letter-spacing: .1em;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
}

.login-subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 17px;
    color: var(--soft);
    margin: 12px 0 0;
    text-align: center;
}

.login-explain {
    font-size: 15px;
    color: var(--soft);
    line-height: 1.65;
    margin: 18px 0 22px;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.login-form .section-label {
    margin: 18px 0 8px;
}

.login-form .section-label:first-child {
    margin-top: 0;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
}

.login-form button,
.login-form input[type="submit"] {
    width: 100%;
    margin: 12px 0 0;
}

.login-form button.secondary,
.login-form input[type="submit"].secondary {
    margin-top: 9px;
}

.login-form .login-hardware-key {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-note {
    font-size: 15px;
    color: var(--faint);
    margin: 12px 0 0;
    text-align: center;
    line-height: 1.6;
}

.login-note a {
    color: var(--soft);
    border-bottom: 1px solid var(--line3);
    padding-bottom: 1px;
}

.login-note a:hover {
    opacity: .75;
}

.login-forgot {
    font-size: 15px;
    color: var(--soft);
    margin: 6px 0 12px;
    text-align: center;
    line-height: 1.6;
}

.login-forgot a {
    color: var(--ink);
    border-bottom: 1px solid var(--line3);
    padding-bottom: 1px;
}

.login-forgot a:hover {
    opacity: .75;
}

/* PASSWORD LOGIN divider */
.login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0 18px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.login-divider span {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .14em;
    color: var(--faint);
    white-space: nowrap;
}

.login-password-section {
    text-align: center;
}

.login-password-section form {
    display: inline;
}

.login-password-section button {
    width: 100%;
    margin: 0;
}

/* Login mobile */
@media (max-width: 768px) {
    .login-page {
        padding: 24px 20px 20px;
    }

    .login-wordmark {
        font-size: 24px;
    }
}
