@charset "UTF-8";

html {
    font-size: 100%;
    height: 100%;
    scroll-behavior: smooth;
}

@font-face {
    font-family: "Archivo";
    src: url("fonts/Archivo-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "SourceSerif4";
    src: url("fonts/SourceSerif4-Variable.woff2") format("woff2");
    font-weight: 200 900;
    font-display: swap;
}

:root {
    --bg: #ffffff;
    --bg-alt: #f3f2ee;
    --bg-raised: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #52514c;
    --text-muted: #7a7973;
    --border: #dcdad2;
    --border-strong: #b8b6ac;
    --link: #1d4e89;
    --link-hover: #0c3a6b;
    --focus-ring: #1d4e89;
    --code-bg: #f3f2ee;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    --tab: #acaba4;
    --alt-tab: #b1b0aa;
    --code: #f7f767;
    --secondary: #a2a0d4;
}

[data-theme=dark] {
    --bg: #14171a;
    --bg-alt: #1c2024;
    --bg-raised: #1f2327;
    --text: #e8e8e6;
    --text-secondary: #b0b0aa;
    --text-muted: #86857f;
    --border: #33383d;
    --border-strong: #484e54;
    --link: #7db0e8;
    --link-hover: #a6cbf2;
    --focus-ring: #7db0e8;
    --code-bg: #1c2024;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --tab: #86857f;
    --alt-tab: #484841;
    --code: #3b3b0f;
    --secondary: #a2a0d4;
}

/* ================================
   Page header (.header) — full-bleed background,
   content centered at 1120px
   ================================ */
.header {
    background: var(--accent);
    color: var(--accent-text);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 1.5em calc(50vw - 560px + 1.5em);
    border-radius: 0;
    margin-bottom: 1.5em;
}

@media screen and (max-width: 1120px) {
    .header {
        padding: 1.5em 1.5em;
    }
}

.header h1 {
    color: var(--accent-text);
    margin-top: 0;
}

.header p {
    color: var(--accent-text);
    opacity: 0.92;
}

.header ul {
    list-style: none;
    margin: 0.8em 0 0;
    padding: 0;
    display: flex;
    gap: 1.5em;
    flex-wrap: wrap;
}

.header a {
    color: var(--accent-text);
    text-decoration: underline;
}

.header a:hover {
    opacity: 0.85;
}

body {
    margin: 0;
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    color: var(--text);
    font-size: 1rem;
    background: var(--bg);
    box-sizing: border-box;
    transition: background-color 0.15s ease, color 0.15s ease;
    overflow-x: hidden;
}

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

:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

#outer-wrapper {
    min-height: 80%;
    margin-bottom: -40px;
}

#wrapper {
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5em 1.5em 1em;
}

.skip-link:not(:focus):not(:active) {
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.skip-link-ul {
    display: block;
    list-style-type: none;
    margin: 0 auto;
    padding: 0;
}

main:focus {
    outline: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text);
    position: relative;
    display: block;
    margin-top: 1.1em;
    margin-bottom: 0.5em;
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    font-weight: 600;
    line-height: 1.25;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
    padding-bottom: 0.3em;
    border-bottom: 3px solid var(--accent);
}

h3 {
    font-size: 1.2rem;
}

h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
    text-decoration: none;
    color: var(--text);
}

h1 a:hover,
h1 a:focus,
h2 a:hover,
h2 a:focus,
h3 a:hover,
h3 a:focus,
h4 a:hover,
h4 a:focus,
h5 a:hover,
h5 a:focus,
h6 a:hover,
h6 a:focus {
    text-decoration: none;
}

p,
li,
blockquote {
    font-family: "SourceSerif4", Georgia, "Times New Roman", serif;
    line-height: 1.55;
}

.content>p,
.content>ul,
.content>ol {
    max-width: 72ch;
}

.classifieds p,
.classifieds li,
.contact-form-wrapper p,
.contact-form-wrapper li,
.single-header p,
.single-header li,
.single-footer p,
.single-footer li,
.single-meta p,
.single-meta li,
nav p,
nav li,
table p,
table li,
form p,
form li,
.footer p,
.footer li,
.blog-menu p,
.blog-menu li,
button p,
button li,
input p,
input li,
select p,
select li,
label p,
label li {
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
}

ol li,
ul li {
    margin-bottom: 0.45em;
}

ul ul,
ol ol,
ol ul,
ul ol {
    margin: 0.6em;
}

ol li::marker {
    color: var(--text);
}

ul li::marker {
    color: var(--accent);
}

li.posts,
li.events {
    margin: 1em;
}

a {
    color: var(--link);
    text-decoration-thickness: 1px;
}

a:hover,
a:focus,
a:active {
    color: var(--link-hover);
    text-decoration: underline;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
}

blockquote,
cite {
    padding: 0 1em;
    border-left: 0.25em solid var(--accent);
    width: 90%;
    margin-left: 0.6em;
    color: var(--text-secondary);
}

.footnote {
    font-size: 0.8em;
    color: var(--text-secondary);
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
}

.footnote sup {
    color: var(--text);
    margin-right: 0.3em;
}

.font-mono {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
}

.highlight>pre {
    background: var(--code-bg);
    color: var(--text);
    padding: 0.6em;
    border-radius: 0.5em;
    margin: 0.6em 0;
    border: 1px solid var(--border);
    overflow-x: auto;
}

.codeblock {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
    border: 1px solid var(--border);
    border-radius: 0.5em;
    font-size: 0.9em;
    padding: 0.6em;
    background: var(--code-bg);
}

pre,
code {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
    font-size: 0.85em;
}

pre>code {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
    font-size: 0.9em;
}

.highlighter {
    background: var(--accent);
    color: var(--accent-text);
    padding: 0.25em;
    border-radius: 0.4em;
    margin: 0.25em;
    font-size: 0.8em;
}

/* ================================
   #header
   ================================ */
#header {
    padding-top: 1em;
    padding-bottom: 0;
    margin-bottom: 0;
}

.blog-title {
    font-size: 2rem;
    font-weight: 700;
    padding-bottom: 0;
    margin-right: 8px;
    display: flex;
    align-items: center;
    gap: 0.5em;
    outline: none;
    width: 100%;
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
}

.blog-title a {
    text-decoration: none;
    color: var(--text);
    line-height: 1.1;
}

.blog-title a:hover,
.blog-title a:active {
    text-decoration: none;
}

.blog-title sup {
    color: var(--accent);
}

.blog-title .logo-icon {
    width: 2.2em;
    height: 2.2em;
    flex-shrink: 0;
    color: var(--accent);
}

/* middle column: title link + slogan stacked tightly */
.blog-title-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.blog-menu.align-right {
    margin-left: auto;
    align-self: center;
}

.asterisk {
    font-size: 1.6rem;
    margin: 0 auto;
    line-height: 0.5em;
    text-align: center;
    display: inline-block;
}

.asterisk:hover {
    color: var(--link-hover);
    transition: color 0.3s ease, rotate 0.3s ease;
    text-decoration: none;
    rotate: 180deg;
}

.blog-slogan {
    color: var(--text-secondary);
    margin: 0.1em 0 0;
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.25;
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
}

.blog-image {
    display: block;
    float: right;
    height: 56px;
    width: 56px;
    margin-top: 0;
    background: url("images/logo.png") no-repeat center/contain;
}

.blog-menu {
    margin: 1em 0 0;
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 0.6em;
}

.blog-menu a {
    padding: 0 0.5em 0 0;
    color: var(--text-secondary);
    text-decoration: none;
}

.blog-menu a:hover,
.blog-menu a:focus {
    color: var(--accent);
    text-decoration: underline;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    background: none;
    border: none;
    padding: 1.5em;
    /* bigger = larger hit/selection area */
    margin-right: 0.5em;
    border-radius: 6px;
    /* rounded square; use 0 for sharp corners */
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    /* border-bottom: 2px solid transparent;*/
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-toggle:active,
.nav-toggle:hover {
    background: var(--accent);

    color: var(--accent-text);
    border-bottom-color: transparent;
}

.nav-toggle svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.15s ease;
}

.nav-toggle[aria-expanded="true"],
.nav-toggle[aria-expanded="true"]:hover,
.nav-toggle[aria-expanded="true"]:active {
    background: var(--accent);
    color: var(--accent-text);
    border-bottom-color: transparent;
}

.nav-toggle[aria-expanded=true] svg {
    transform: rotate(180deg);
}

/* ================================
   Menu panel — full-bleed background,
   content centered at 1120px
   ================================ */
.nav-panel {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
    padding: 2em 1.5em;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 0;
}

.nav-panel[hidden] {
    display: none;
}

.nav-panel-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5em 3em;
    padding: 0 1.5em;
}

.nav-panel-col {
    display: flex;
    flex-direction: column;
}

.nav-panel-group-title {
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin: 0 0 0.4em;
    padding-bottom: 0.4em;
    border-bottom: 2px solid var(--accent);
}

.nav-panel-item {
    display: block;
    padding: 0.8em 0;
    border-bottom: 1px solid var(--border);
}

.nav-panel-item:last-child {
    border-bottom: none;
}

.nav-panel-item-title {
    display: block;
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--accent);
    text-decoration: none;
}

.nav-panel-item-title:hover,
.nav-panel-item-title:focus {
    text-decoration: underline;
}

.nav-panel-item-desc {
    display: block;
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.2em;
}

@media screen and (max-width: 640px) {
    .nav-panel {
        padding: 1.5em 1em;
    }

    .nav-panel-inner {
        grid-template-columns: 1fr;
        padding: 0 1em;
    }
}

.theme-toggle {
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    width: 2.2em;
    height: 2.2em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--border-strong);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    display: none;
    fill: none;
}

.theme-toggle svg path,
.theme-toggle svg circle,
.theme-toggle svg line {
    stroke: var(--text);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle .icon-sun {
    display: block;
}

[data-theme=dark] .theme-toggle .icon-sun {
    display: none;
}

[data-theme=dark] .theme-toggle .icon-moon {
    display: block;
}

#outer-wrapper:after {
    content: "";
    display: block;
}

.back-to-top {
    font-size: 1.6rem;
    position: fixed;
    inset: auto 1rem 1rem auto;
    display: inline-block;
    padding: 0.6rem 0.8rem;
    background-color: var(--bg-raised);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.back-to-top:is(:link, :visited, :hover, :active) {
    color: var(--accent);
    text-decoration: none;
}

.post-title {
    background: var(--accent);
    color: var(--accent-text);
    padding: 0.9em 1.2em;
    border-radius: 4px;
    margin: 0 0 1.2em;
}

.content {
    position: relative;
}

article {
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
}

table th,
table td {
    padding: 0.5em 0.6em;
    text-align: left;
    border: 1px solid var(--border);
}

table th {
    background-color: var(--accent);
    color: var(--accent-text);
    font-weight: 600;
}

table tr:nth-child(even) {
    background-color: var(--bg-alt);
}

table tr:hover {
    background-color: var(--code-bg);
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1em 0;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.table-scroll table {
    border: none;
    margin: 0;
}

table[data-sortable] th {
    cursor: pointer;
    user-select: none;
}

table[data-sortable] th::after {
    content: "";
    display: inline-block;
    width: 0;
    margin-left: 0;
    font-size: 0.7em;
    line-height: 1;
    vertical-align: middle;
    opacity: 0;
}

table[data-sortable] th.sort-asc::after {
    content: "▲";
    width: 1em;
    margin-left: 0.2em;
    opacity: 0.8;
}

table[data-sortable] th.sort-desc::after {
    content: "▼";
    width: 1em;
    margin-left: 0.2em;
    opacity: 0.8;
}

.data-table .number {
    text-align: right;
}

.data-table .postcode,
.data-table .date,
.data-table .type,
.data-table .category,
.data-table .rating-date {
    white-space: nowrap;
}


.single {
    margin: 1em 0 2em;
}

.single-expired {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1em;
    color: var(--text-secondary);
}

.single-header {
    border-bottom: 3px solid var(--accent);
    padding-bottom: 1em;
    margin-bottom: 1.2em;
}

.single-category {
    font-size: 0.85rem;
    margin: 0 0 0.5em;
}

.single-category a {
    color: var(--accent-dark);
    text-decoration: none;
}

.single-category a:hover {
    text-decoration: underline;
}

.single-title {
    margin: 0 0 0.5em;
}

.single-meta {
    list-style: none;
    margin: 0.8em 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em 1.5em;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.single-meta li strong {
    color: var(--text);
}

.single-body {
    margin: 1.2em 0;
}

.single-footer {
    border-top: 1px solid var(--border);
    padding-top: 1em;
    margin-top: 1.5em;
}

.single-apply {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-text);
    padding: 0.6em 1.4em;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

.single-apply:hover,
.single-apply:focus {
    background: var(--accent-dark);
    color: var(--accent-text);
    text-decoration: none;
}

.single-disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1em;
}

/* ================================
   Classifieds header — full-bleed background,
   content centered at 1120px
   ================================ */
.classifieds-header {
    background: var(--accent);
    color: var(--accent-text);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 1.5em calc(50vw - 560px + 1.5em);
    border-radius: 0;
    margin-bottom: 1.5em;
}

@media screen and (max-width: 1120px) {
    .classifieds-header {
        padding: 1.5em 1.5em;
    }
}

.classifieds-header h1 {
    color: var(--accent-text);
    margin-top: 0;
}

.classifieds-header p {
    color: var(--accent-text);
    opacity: 0.92;
}

.classifieds-header ul {
    list-style: none;
    margin: 0.8em 0 0;
    padding: 0;
    display: flex;
    gap: 1.5em;
    flex-wrap: wrap;
}

.classifieds-header a {
    color: var(--accent-text);
    text-decoration: underline;
}

.classifieds-header a:hover {
    opacity: 0.85;
}

.classifieds-nav {
    margin-bottom: 2em;
}

.classifieds-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
}

.classifieds-nav li {
    margin: 0;
}

.classifieds-nav a {
    display: inline-block;
    padding: 0.4em 0.9em;
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
}

.classifieds-nav a:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.classifieds-nav .empty {
    display: inline-block;
    padding: 0.4em 0.9em;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.classifieds-nav .count {
    font-size: 0.8em;
    opacity: 0.75;
}

.classifieds-empty {
    color: var(--text-secondary);
    padding: 2em 0;
}

.classifieds-category {
    margin-bottom: 2em;
    scroll-margin-top: 1em;
}

.classifieds-category h2 {
    border-bottom: 3px solid var(--accent);
    padding-bottom: 0.4em;
}

.classifieds-category .count {
    font-size: 0.7em;
    color: var(--text-secondary);
    font-weight: normal;
}

.classifieds-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.classifieds-item {
    padding: 0.7em 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.classifieds-item a {
    font-weight: 600;
    text-decoration: none;
}

.classifieds-item a:hover {
    text-decoration: underline;
}

.classifieds-item .loc,
.classifieds-item .price,
.classifieds-item .closes {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.contact-form-wrapper {
    max-width: 832px;
    margin: 2em auto;
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    color: var(--text);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25em;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}

.form-field label {
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    font-size: 0.9em;
    color: var(--text);
}

.form-field .optional {
    font-weight: normal;
    color: var(--text-muted);
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 0.6em 0.8em;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1em;
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    color: var(--text);
    background-color: var(--bg-alt);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
}

.hp-field {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.submit-btn {
    align-self: flex-start;
    padding: 0.7em 1.8em;
    background: var(--accent);
    color: var(--accent-text);
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.submit-btn:hover,
.submit-btn:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

@media only screen and (max-width: 540px) {
    .submit-btn {
        align-self: stretch;
        text-align: center;
    }
}

#chart-timeseries,
#chart-ftb-static,
#chart-mortgagecash {
    margin: 1em 0 2em;
    min-height: 400px;
}

.book-list {
    display: grid;
    grid-gap: 0;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    max-width: 1120px;
}

.book-list .book {
    display: flex;
}

.book-list .book-img {
    flex-shrink: 0;
    width: 90px;
}

.book-list .book-img img {
    border: 0;
}

label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
}

input,
select,
textarea {
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    font-size: 1rem;
    padding: 0.5em 0.8em;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    background-color: var(--bg);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}

input[type=number] {
    width: 100px;
}

input[type=checkbox] {
    width: 16px;
    height: 16px;
}

textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
    line-height: 1.4;
}

button,
.button {
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    font-size: 1rem;
    padding: 0.5em 1.2em;
    margin: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: var(--accent);
    color: var(--accent-text);
    transition: background-color 0.15s ease;
}

button:hover,
.button:hover {
    background: var(--accent-dark);
}

button:disabled,
.button:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

.token-help,
.info-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.error {
    background: var(--bg-alt);
    border: 1px solid #d67373;
    color: #b3301c;
    padding: 0.7em;
    border-radius: 4px;
    margin-bottom: 1.2em;
}

.loading {
    color: var(--text-secondary);
    margin: 1.2em 0;
}

.panel {
    background: var(--bg-raised);
    padding: 1.2em;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 1.2em;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin-bottom: 1.2em;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.input-group {
    display: flex;
    gap: 0.6em;
    margin-bottom: 1.2em;
}

#drop-zone,
#dropzone {
    border: 2px dashed var(--border-strong);
    border-radius: 12px;
    width: 100%;
    min-height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: var(--text-secondary);
}

#drop-zone.dragover,
#dropzone.dragover {
    background-color: var(--bg-alt);
}

#fileInput {
    display: none;
}

pre {
    background: var(--code-bg);
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 1em;
    border: 1px solid var(--border);
}

#sessionLog {
    width: 100%;
    max-width: 800px;
    margin-top: 2rem;
    overflow-x: auto;
}

#sessionLog table {
    width: 100%;
}

.deleteBtn {
    background-color: transparent;
    border: none;
    color: #b3301c;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.2em 0.5em;
}

.deleteBtn:hover {
    color: #8f2515;
}

#timer {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.footer {
    font-size: 0.85rem;
    padding: 3em 0 2em;
    background: var(--bg-alt);
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    margin-top: 2em;
    line-height: 1.5;
}

.footer .wrapper {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5em;
}

/* three-column grid */
.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3em;
}

.footer-col-title, .footer-subheading {
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.8em;
    padding-bottom: 0.4em;
    border-bottom: 1px solid var(--border);
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col li {
    margin-bottom: 0.5em;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-col a:hover,
.footer-col a:focus {
    color: var(--accent);
    text-decoration: underline;
}

.footer-subheading {
    margin-top: 2em;
}

/* theme toggle rendered as a text link inside the list */
.footer-theme-toggle {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--text-secondary);
    cursor: pointer;
}

.footer-theme-toggle:hover {
    color: var(--accent);
    text-decoration: underline;
    background: none;
}

.footer-legal {
    margin: 2.5em 0 0;
    padding-top: 1.5em;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    max-width: none;
}

.footer-theme-control {
    display: flex;
    justify-content: center;
    margin-top: 1.25em;
}

.footer-theme-toggle-icon {
    box-sizing: border-box;
    width: 2.2em;
    height: 2.2em;
    padding: 0;
    border: 1px solid #000;
    border-radius: 0;
    margin: 0;
    background: #fff;
    color: var(--accent);
}

.footer-theme-toggle-icon:hover,
.footer-theme-toggle-icon:focus {
    background: #fff;
    color: var(--accent);
}

.footer-theme-toggle-icon .icon-sun {
    display: block !important;
}

.footer-theme-toggle-icon .icon-moon {
    display: none !important;
}

[data-theme="dark"] .footer-theme-toggle-icon .icon-sun {
    display: none !important;
}

[data-theme="dark"] .footer-theme-toggle-icon .icon-moon {
    display: block !important;
}

.footer-theme-toggle-icon svg path,
.footer-theme-toggle-icon svg circle,
.footer-theme-toggle-icon svg line {
    stroke: currentColor;
}

.footer-theme-toggle-icon svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

/*####################################*/

.sponsor-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    background: var(--bg-alt);
    margin: 1.5em 0;
    box-shadow: var(--shadow);
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
}

.sponsor-card__eyebrow {
    display: block;
    font-size: 0.6875rem;
    /* 11px */
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.sponsor-card a {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: var(--text);
}

.sponsor-card a:hover .sponsor-card__text strong,
.sponsor-card a:focus .sponsor-card__text strong {
    color: var(--accent);
    text-decoration: underline;
}

.sponsor-card__logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex: none;
    border: none;
    /* override the global img border */
    background: #fff;
    /* keep dark logos legible in dark mode */
    border-radius: 4px;
    padding: 4px;
}

.sponsor-card__text {
    display: flex;
    flex-direction: column;
    font-size: 0.875rem;
    /* 14px */
    line-height: 1.35;
    color: var(--text-secondary);
}

.sponsor-card__text strong {
    font-size: 0.9375rem;
    /* 15px */
    font-weight: 600;
    color: var(--text);
}

/*####################################*/


/* collapse to one column on small screens */
@media screen and (max-width: 640px) {
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 1.5em;
    }
}

/* Tablet and below */
@media (max-width: 768px) {
    .blog-title-text {
        font-size: 1.4rem;
    }

    .blog-slogan {
        font-size: 0.75rem;
    }
}

/* Phones */
@media (max-width: 480px) {
    .blog-title-text {
        font-size: 1.2rem;
    }

    .blog-slogan {
        font-size: 0.65rem;
    }
}


@media screen and (max-width: 1000px) {
    #wrapper {
        padding: 1em;
    }

    .book-list {
        grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    }

    .book-list .book-img {
        width: 72px;
    }

    .footer {
        line-height: 30px;
        padding-top: 10px;
    }

    .footer .wrapper {
        padding: 0 1em;
    }

    .single-meta {
        flex-direction: column;
        gap: 0.4em;
    }
}

@media only screen and (min-width: 320px) and (max-width: 480px) {
    .blog-menu {
        margin-bottom: 1em;
    }

    .theme-toggle {
        margin-left: 0;
    }

    .back-to-top {
        font-size: 1.2rem;
        padding: 0.5rem 0.7rem;
    }

    .classifieds-header ul {
        flex-direction: column;
        gap: 0.6em;
    }
}

.catchment-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em 1em;
    margin-top: 0.75em;
}

.catchment-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-size: 0.9rem;
}

.catchment-swatch {
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    border-radius: 50%;
    flex-shrink: 0;
}


.home-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    margin: 1.5em 0;
    align-items: start;
}

.weather-glance {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1em 1.2em;
    background: var(--bg-alt);
    box-shadow: var(--shadow);
}

.weather-glance-date {
    margin: 0 0 0.6em;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.weather-glance-header {
    display: flex;
    align-items: center;
    gap: 0.8em;
    margin-bottom: 0.8em;
}

.weather-glance-icon {
    flex: none;
    width: 64px;
    height: 64px;
    border: none;
}

.weather-glance-temp {
    display: block;
    font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Gill Sans", sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.1;
}

.weather-glance-desc {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.weather-glance-stats {
    list-style: none;
    margin: 0;
    padding: 0.6em 0 0;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5em 1em;
}

.weather-glance-stats li {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.weather-glance-stats li span {
    color: var(--text-muted);
}

@media screen and (max-width: 800px) {
    .home-hero-grid {
        grid-template-columns: 1fr;
    }
}
