/*
 * Shared styles for the per-app detail pages.
 *
 * The four original pages each carry their own inline <style> block. Rather
 * than triplicate ~250 lines of that for the app pages, they share this file.
 * Colours and spacing match the inline blocks exactly.
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #f5f7fb;
    color: #1f2937;
}

.page-header {
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
    color: white;
    padding: 40px 20px 90px;
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    right: -120px;
    top: 40px;
}

.nav {
    max-width: 1150px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
}

/* The mark and the wordmark sit on one line. Both selectors are needed because
   the home page renders the pair bare and every other page wraps it in a link
   back to /. */
.logo,
.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo a {
    color: white;
    text-decoration: none;
}

.logo-mark {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: block;
}

.nav a {
    color: white;
    text-decoration: none;
    margin-left: 24px;
    font-weight: 600;
}

.crumbs {
    max-width: 1150px;
    margin: 40px auto 0;
    position: relative;
    z-index: 2;
    font-size: 0.9rem;
    color: #bfdbfe;
}

.crumbs a {
    color: #bfdbfe;
    text-decoration: none;
    margin: 0;
}

.crumbs a:hover {
    text-decoration: underline;
}

.hero {
    max-width: 1150px;
    margin: 24px auto 0;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 34px;
    align-items: start;
}

.hero-icon {
    width: 140px;
    height: 140px;
    border-radius: 32px;
    display: block;
    box-shadow: 0 14px 34px rgba(0,0,0,0.28);
}

.hero h1 {
    font-size: 3.1rem;
    line-height: 1.1;
    margin-bottom: 14px;
}

.tagline {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 660px;
    margin-bottom: 24px;
    color: #e0e7ff;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    color: #1e3a8a;
    padding: 14px 26px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}

.store-btn .apple {
    font-size: 1.3rem;
    line-height: 1;
}

.hero-meta {
    margin-top: 16px;
    font-size: 0.9rem;
    color: #bfdbfe;
}

main {
    display: block;
}

.section {
    max-width: 1150px;
    margin: auto;
    padding: 64px 20px 0;
}

.section:last-of-type {
    padding-bottom: 70px;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 18px;
}

.section > p {
    color: #4b5563;
    line-height: 1.7;
    font-size: 1.05rem;
    max-width: 800px;
    margin-bottom: 18px;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 34px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.07);
    border-left: 5px solid #f5a623;
}

.steps {
    counter-reset: step;
    list-style: none;
    display: grid;
    gap: 18px;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding-left: 54px;
    line-height: 1.65;
    color: #374151;
    font-size: 1.05rem;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -2px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checklist {
    list-style: none;
    display: grid;
    gap: 12px;
}

.checklist li {
    color: #374151;
    line-height: 1.6;
    font-size: 1.05rem;
}

.checklist li::before {
    content: "✓";
    /* A darker amber than the accent - #f5a623 only reaches 2.1:1 on white,
       and these ticks carry meaning rather than decorating. */
    color: #b45309;
    font-weight: bold;
    margin-right: 10px;
}

.faq {
    display: grid;
    gap: 16px;
}

.faq details {
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    /* Vertical padding lives on the summary so the whole ~48px strip is
       tappable, rather than just the 21px line of text. */
    padding: 6px 24px;
}

.faq summary {
    font-weight: bold;
    font-size: 1.08rem;
    cursor: pointer;
    list-style: none;
    padding: 14px 0;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    float: right;
    color: #2563eb;
    font-size: 1.4rem;
    line-height: 1;
}

.faq details[open] summary::after {
    content: "–";
}

.faq p {
    margin-top: 2px;
    padding-bottom: 14px;
    color: #4b5563;
    line-height: 1.7;
}

.faq a {
    color: #2563eb;
}

.other-apps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.other-app {
    background: white;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    color: #1f2937;
}

.other-app:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.other-app img {
    width: 64px;
    height: 64px;
    border-radius: 15px;
    display: block;
}

.other-app strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.other-app span {
    color: #6b7280;
    font-size: 0.92rem;
}

.cta {
    background: linear-gradient(135deg, #111827, #1e3a8a);
    color: white;
    text-align: center;
    padding: 70px 20px;
    margin-top: 70px;
}

.cta h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta p {
    max-width: 650px;
    margin: auto;
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Amber, picked up from the spark in the logo. It is the one accent the palette
   has, so it is reserved for the primary action on a page. */
.btn {
    display: inline-block;
    background: #f5a623;
    color: #1f2937;
    padding: 15px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    margin-top: 26px;
}

footer {
    background: #111827;
    color: white;
    padding: 30px 20px;
    text-align: center;
}

footer p {
    margin-bottom: 8px;
}

footer a {
    color: #93c5fd;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 850px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-icon {
        margin: 0 auto;
    }

    .hero h1 {
        font-size: 2.3rem;
    }

    .tagline {
        text-align: left;
    }

    .other-apps {
        grid-template-columns: 1fr;
    }

    .nav {
        flex-direction: column;
        gap: 15px;
    }

    .nav a {
        display: inline-block;
        margin: 0 2px;
        padding: 12px 10px;
    }

    footer a {
        display: inline-block;
        padding: 10px 8px;
    }
}

/* ---------------------------------------------------------------------------
 * Prose pages (how rewards work, articles). Shares the header, card, steps,
 * checklist, and FAQ styles above.
 * ------------------------------------------------------------------------ */

.hero.no-icon {
    grid-template-columns: 1fr;
}

.hero.no-icon h1 {
    max-width: 900px;
}

.article-meta {
    color: #bfdbfe;
    font-size: 0.92rem;
    margin-top: 18px;
}

.prose {
    max-width: 760px;
}

.prose h2 {
    font-size: 1.75rem;
    margin: 46px 0 14px;
}

.prose h3 {
    font-size: 1.25rem;
    margin: 30px 0 10px;
}

.prose p {
    color: #374151;
    line-height: 1.75;
    font-size: 1.06rem;
    margin-bottom: 16px;
}

.prose ul {
    margin: 0 0 18px 22px;
}

.prose li {
    color: #374151;
    line-height: 1.7;
    font-size: 1.06rem;
    margin-bottom: 9px;
}

.prose a {
    color: #2563eb;
}

.prose .lead {
    font-size: 1.18rem;
    line-height: 1.7;
    color: #4b5563;
}

.callout {
    background: white;
    border-left: 5px solid #f5a623;
    border-radius: 14px;
    padding: 24px 28px;
    margin: 28px 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

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

.article-list {
    display: grid;
    gap: 22px;
    max-width: 860px;
}

.article-card {
    background: white;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.07);
    border-left: 5px solid #f5a623;
    text-decoration: none;
    display: block;
    color: inherit;
}

.article-card:hover {
    box-shadow: 0 14px 32px rgba(0,0,0,0.1);
}

.article-card h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #1f2937;
}

.article-card p {
    color: #4b5563;
    line-height: 1.65;
    margin-bottom: 12px;
}

.article-card .read {
    color: #2563eb;
    font-weight: 600;
}

/* --- App screenshots ---------------------------------------------------- */

.shots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 26px;
    /* Sized so the shots never render wider than their 370px native width. */
    max-width: 640px;
}

.shot figure {
    margin: 0;
}

.shot img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 22px;
    background: #0b1020;
    box-shadow: 0 14px 34px rgba(17,24,39,0.22);
}

.shot figcaption {
    margin-top: 12px;
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 850px) {
    .shots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

/* ---------------------------------------------------------------------------
 * Suggestion form (/make-extra-pocket-money)
 *
 * Everything is scoped under .suggest-form rather than styling bare input and
 * label elements, because this stylesheet is loaded by ten pages that have no
 * form on them at all. contact.html keeps its own copy of these rules inline -
 * it does not use this stylesheet.
 * ------------------------------------------------------------------------ */

.suggest-form .field {
    margin-bottom: 20px;
}

.suggest-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.suggest-form .hint {
    display: block;
    font-weight: normal;
    color: #6b7280;
    font-size: 0.88rem;
    margin-top: 3px;
}

.suggest-form .required {
    color: #dc2626;
}

.suggest-form input[type="text"],
.suggest-form input[type="email"],
.suggest-form select,
.suggest-form textarea {
    width: 100%;
    padding: 13px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    background: #f9fafb;
    color: #1f2937;
    font-family: inherit;
}

.suggest-form input:focus,
.suggest-form select:focus,
.suggest-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
}

.suggest-form textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.5;
}

/* Hidden from people, filled in by most bots - see the honeypot note in
   google-apps-script/README.md. */
.suggest-form .hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.suggest-form .submit-btn {
    background: #f5a623;
    color: #1f2937;
    border: none;
    padding: 16px 34px;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    font-family: inherit;
}

.suggest-form .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.suggest-form .form-note {
    color: #6b7280;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-top: 18px;
    overflow-wrap: anywhere;
}

.suggest-form .form-note a {
    color: #2563eb;
}

.status {
    display: none;
    padding: 16px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.status.show {
    display: block;
}

.status.success {
    background: #dcfce7;
    color: #14532d;
    border-left: 5px solid #16a34a;
}

.status.error {
    background: #fee2e2;
    color: #7f1d1d;
    border-left: 5px solid #dc2626;
}

.status a {
    color: inherit;
    font-weight: bold;
}

/* The app grid appears inside prose on /make-extra-pocket-money, where it needs
   the breathing room a bare <p> would otherwise have supplied. */
.prose .other-apps {
    margin: 6px 0 26px;
}

/* --- Suggestion form: choice groups, per-field errors, counter ------------ */

.suggest-form fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 20px;
}

.suggest-form legend {
    font-weight: bold;
    font-size: 0.95rem;
    margin-bottom: 10px;
    padding: 0;
}

.suggest-form .hint {
    display: block;
    font-weight: normal;
    color: #6b7280;
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 3px 0 0;
}

.suggest-form .choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.suggest-form .choices-inline {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* The whole tile is the label, so the tap target is the tile rather than the
   14px box - the same reason the nav links carry padding on mobile. */
.suggest-form .choice {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 0;
    padding: 13px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    font-weight: normal;
    font-size: 0.95rem;
    line-height: 1.45;
    cursor: pointer;
}

.suggest-form .choice:hover {
    border-color: #bfdbfe;
    background: #f8fafc;
}

.suggest-form .choice:focus-within {
    border-color: #2563eb;
    background: white;
}

.suggest-form .choice input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex-shrink: 0;
    accent-color: #2563eb;
}

.suggest-form .choice strong {
    display: block;
}

.suggest-form .choice-note {
    display: block;
    color: #6b7280;
    font-size: 0.88rem;
}

.suggest-form .counter {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 6px;
    text-align: right;
}

.suggest-form .field-error {
    display: none;
    color: #b91c1c;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 7px;
}

.suggest-form .field-error.show {
    display: block;
}

.suggest-form [aria-invalid="true"] {
    border-color: #dc2626;
    background: #fef2f2;
}

@media (max-width: 850px) {
    .suggest-form .choices {
        grid-template-columns: 1fr;
    }
}

/* --- Comparison table (/best-apps-that-pay-you) --------------------------- */

/* Wide tables must scroll inside their own box rather than pushing the page
   sideways on a phone - the same rule the screenshot grid follows. */
.table-wrap {
    overflow-x: auto;
    /* Sits outside .prose so the six columns get the full section width; the
       prose either side of it stays at its readable 760px. */
    margin: 6px 0 26px;
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.07);
    background: white;
}

.compare {
    border-collapse: collapse;
    width: 100%;
    min-width: 620px;
    font-size: 0.97rem;
}

.compare th,
.compare td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eef1f6;
    line-height: 1.5;
    vertical-align: top;
}

.compare thead th {
    background: #f8fafc;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4b5563;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.compare tbody tr:last-child td {
    border-bottom: 0;
}

.compare th[scope="row"] {
    font-weight: bold;
    white-space: nowrap;
}

.compare th[scope="row"] a {
    color: #2563eb;
    text-decoration: none;
}

.compare th[scope="row"] a:hover {
    text-decoration: underline;
}

.compare .app-cell {
    display: flex;
    align-items: center;
    gap: 11px;
}

.compare .app-cell img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: block;
    flex-shrink: 0;
}

.compare .yes {
    color: #15803d;
    font-weight: bold;
}

.table-note {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: -14px 0 26px;
}

/* A "best for X" pick, so the page answers the question rather than only
   tabulating it. */
.picks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 6px 0 26px;
}

.pick {
    background: white;
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border-left: 5px solid #f5a623;
}

.pick h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.pick p {
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.97rem;
    margin: 0;
}

.pick a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 850px) {
    .picks {
        grid-template-columns: 1fr;
    }
}

/* Available to screen readers, out of the visual flow. Used for the comparison
   table's caption, which a sighted reader gets from the surrounding heading. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
