/* =====================================================================
   DedSafe site template — main stylesheet
   Palette from brand swatches:
     teal   #0e4251   sage  #92a493   slate #597885
     mist   #cbd1c5   peach #e8aa6f   cream #f6efe9
   Designed for legibility: large type, high contrast, generous spacing,
   big touch targets. Built for an older audience.
   ===================================================================== */

/* ---- Design tokens -------------------------------------------------- */
:root {
	--ds-teal:      #0e4251;
	--ds-teal-700:  #0a3441;
	--ds-teal-900:  #072732;
	--ds-sage:      #92a493;
	--ds-sage-700:  #728573;
	--ds-slate:     #597885;
	--ds-slate-700: #45606b;
	--ds-slate-text: #3f5b67;   /* slate for small text: passes WCAG AA contrast */
	--ds-sage-strong: #5f7461;  /* sage behind white text */
	--ds-mist:      #cbd1c5;
	--ds-peach:     #e8aa6f;
	--ds-peach-700: #d9944f;
	--ds-cream:     #f6efe9;
	--ds-cream-100: #fbf7f2;
	--ds-white:     #ffffff;

	--ds-ink:       #14313a;   /* body text */
	--ds-ink-soft:  #4c5f66;   /* muted text */
	--ds-line:      #e4dccf;   /* hairline borders on cream */

	--ds-font-head: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--ds-font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--ds-radius:    14px;
	--ds-radius-sm: 9px;
	--ds-shadow:    0 6px 24px rgba(14, 66, 81, 0.08);
	--ds-shadow-lg: 0 14px 44px rgba(14, 66, 81, 0.14);

	--ds-container: 1140px;
	--ds-gap:       clamp(1rem, 2vw, 1.75rem);
}

html[data-width="narrow"] { --ds-container: 920px; }
html[data-width="wide"]   { --ds-container: 1320px; }

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body.ds-body {
	margin: 0;
	background: var(--ds-cream);
	color: var(--ds-ink);
	font-family: var(--ds-font-body);
	font-size: 1.125rem;         /* 18px base — larger for readability */
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a {
	color: var(--ds-slate-text);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
a:hover { color: var(--ds-teal); }

h1, h2, h3, h4 {
	font-family: var(--ds-font-head);
	color: var(--ds-teal);
	line-height: 1.2;
	font-weight: 600;
	margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

/* ---- Layout helpers ------------------------------------------------- */
.ds-container {
	width: 100%;
	max-width: var(--ds-container);
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
}

.ds-page { padding-block: clamp(2rem, 5vw, 3.5rem); }

.ds-grid { display: block; }

.ds-grid--sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: start;
}

@media (max-width: 900px) {
	.ds-grid--sidebar { grid-template-columns: 1fr; }
}

/* ---- Accessibility -------------------------------------------------- */
.ds-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ds-teal);
	color: var(--ds-white);
	padding: 0.75rem 1.25rem;
	border-radius: 0 0 var(--ds-radius-sm) 0;
	z-index: 1000;
	font-weight: 600;
}
.ds-skip-link:focus {
	left: 0;
	color: var(--ds-white);
}

:focus-visible {
	outline: 3px solid var(--ds-peach);
	outline-offset: 2px;
	border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}

/* ---- Topbar --------------------------------------------------------- */
.ds-topbar {
	background: var(--ds-teal-900);
	color: var(--ds-cream);
	font-size: 0.95rem;
}
.ds-topbar a { color: var(--ds-mist); }
.ds-topbar a:hover { color: var(--ds-white); }
.ds-topbar .ds-container {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
	padding-block: 0.5rem;
}

/* ---- Header & brand ------------------------------------------------- */
.ds-header {
	background: var(--ds-cream-100);
	border-bottom: 1px solid var(--ds-line);
}
.ds-header--sticky {
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: var(--ds-shadow);
}
.ds-header__inner {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 3vw, 2rem);
	padding-block: 0.9rem;
}

.ds-brand { display: flex; align-items: center; gap: 0.9rem; margin-right: auto; }
.ds-brand__link { display: inline-flex; align-items: center; text-decoration: none; }
.ds-brand__logo { height: 52px; width: auto; display: block; }
.ds-brand__wordmark {
	font-family: var(--ds-font-head);
	font-size: 1.9rem;
	font-weight: 700;
	color: var(--ds-teal);
	letter-spacing: 0.01em;
}
.ds-brand__tagline {
	display: none;
	color: var(--ds-ink-soft);
	font-size: 0.95rem;
	max-width: 22ch;
	line-height: 1.35;
}
@media (min-width: 1024px) {
	.ds-brand__tagline { display: inline-block; }
}

/* ---- Primary navigation -------------------------------------------- */
.ds-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}
.ds-nav li { position: relative; }
.ds-nav a {
	display: block;
	padding: 0.7rem 1rem;
	color: var(--ds-teal);
	text-decoration: none;
	font-weight: 600;
	border-radius: var(--ds-radius-sm);
	white-space: nowrap;
}
.ds-nav a:hover,
.ds-nav a:focus-visible { background: var(--ds-mist); }
.ds-nav .current > a,
.ds-nav .active > a {
	background: var(--ds-teal);
	color: var(--ds-white);
}

/* Dropdowns */
.ds-nav li ul {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 220px;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	background: var(--ds-white);
	border: 1px solid var(--ds-line);
	border-radius: var(--ds-radius-sm);
	box-shadow: var(--ds-shadow-lg);
	padding: 0.4rem;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
	z-index: 120;
}
.ds-nav li:hover > ul,
.ds-nav li:focus-within > ul {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Mobile menu toggle */
.ds-nav-toggle {
	display: none;
	align-items: center;
	gap: 0.6rem;
	background: var(--ds-teal);
	color: var(--ds-white);
	border: 0;
	border-radius: var(--ds-radius-sm);
	padding: 0.7rem 1rem;
	font-family: var(--ds-font-body);
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}
.ds-nav-toggle__bar,
.ds-nav-toggle__bar::before,
.ds-nav-toggle__bar::after {
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	position: relative;
}
.ds-nav-toggle__bar::before,
.ds-nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.ds-nav-toggle__bar::before { top: -7px; }
.ds-nav-toggle__bar::after  { top: 7px; }

@media (max-width: 860px) {
	.ds-nav-toggle { display: inline-flex; }
	.ds-nav {
		position: fixed;
		inset: 0 0 0 auto;
		width: min(86vw, 340px);
		background: var(--ds-cream-100);
		border-left: 1px solid var(--ds-line);
		box-shadow: var(--ds-shadow-lg);
		padding: 5rem 1.25rem 2rem;
		transform: translateX(100%);
		transition: transform 0.22s ease;
		overflow-y: auto;
		z-index: 200;
	}
	.ds-nav.is-open { transform: translateX(0); }
	.ds-nav ul { flex-direction: column; align-items: stretch; gap: 0.15rem; }
	.ds-nav a { padding: 0.85rem 1rem; font-size: 1.1rem; }
	.ds-nav li ul {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		background: transparent;
		padding-left: 1rem;
	}
	body.ds-nav-open { overflow: hidden; }
}

/* ---- Hero ----------------------------------------------------------- */
.ds-hero {
	background:
		radial-gradient(1200px 400px at 80% -10%, rgba(232,170,111,0.18), transparent 60%),
		linear-gradient(180deg, var(--ds-cream-100), var(--ds-cream));
	padding-block: clamp(2.5rem, 7vw, 5rem);
	text-align: center;
}
.ds-hero h1 { margin-bottom: 0.35em; }
.ds-hero p { font-size: 1.2rem; color: var(--ds-ink-soft); max-width: 60ch; margin-inline: auto; }

/* ---- Breadcrumbs ---------------------------------------------------- */
.ds-breadcrumbs {
	background: var(--ds-cream);
	border-bottom: 1px solid var(--ds-line);
	font-size: 0.95rem;
}
.ds-breadcrumbs .ds-container { padding-block: 0.6rem; }
.ds-breadcrumbs ol,
.ds-breadcrumbs ul {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center;
}
.ds-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
	content: "›"; margin-right: 0.4rem; color: var(--ds-sage);
}

/* ---- Cards (module chrome & content) -------------------------------- */
.ds-card {
	background: var(--ds-white);
	border: 1px solid var(--ds-line);
	border-radius: var(--ds-radius);
	box-shadow: var(--ds-shadow);
	padding: clamp(1.25rem, 3vw, 1.75rem);
	margin-bottom: 1.5rem;
}
.ds-card__title {
	font-family: var(--ds-font-head);
	color: var(--ds-teal);
	font-size: 1.35rem;
	margin: 0 0 0.75rem;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid var(--ds-mist);
}

.ds-sidebar .ds-card { position: sticky; top: 90px; }

/* ---- Buttons -------------------------------------------------------- */
.ds-btn,
.btn,
button.button,
a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 50px;
	padding: 0.75rem 1.5rem;
	border-radius: var(--ds-radius-sm);
	border: 2px solid var(--ds-teal);
	background: var(--ds-teal);
	color: var(--ds-white);
	font-family: var(--ds-font-body);
	font-size: 1.05rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.16s ease, border-color 0.16s ease, transform 0.08s ease;
}
.ds-btn:hover,
.btn:hover,
button.button:hover,
a.button:hover {
	background: var(--ds-teal-700);
	border-color: var(--ds-teal-700);
	color: var(--ds-white);
}
.ds-btn:active { transform: translateY(1px); }

.ds-btn--accent {
	background: var(--ds-peach);
	border-color: var(--ds-peach);
	color: var(--ds-teal-900);
}
.ds-btn--accent:hover {
	background: var(--ds-peach-700);
	border-color: var(--ds-peach-700);
	color: var(--ds-teal-900);
}
.ds-btn--ghost {
	background: transparent;
	color: var(--ds-teal);
}
.ds-btn--ghost:hover { background: var(--ds-mist); color: var(--ds-teal); }

/* ---- Forms ---------------------------------------------------------- */
label { font-weight: 600; color: var(--ds-teal); }

input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="url"], input[type="tel"],
input[type="number"], input[type="date"], select, textarea {
	width: 100%;
	max-width: 100%;
	min-height: 50px;
	padding: 0.65rem 0.85rem;
	font-family: var(--ds-font-body);
	font-size: 1.05rem;
	color: var(--ds-ink);
	background: var(--ds-white);
	border: 1px solid var(--ds-slate);
	border-radius: var(--ds-radius-sm);
}
textarea { min-height: 120px; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
	outline: 3px solid var(--ds-peach);
	outline-offset: 1px;
	border-color: var(--ds-teal);
}
.ds-header__search input[type="search"] { min-height: 44px; }

/* ---- Tables --------------------------------------------------------- */
table.table, .ds-main table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5rem;
}
.ds-main th, .ds-main td {
	padding: 0.75rem 0.9rem;
	text-align: left;
	border-bottom: 1px solid var(--ds-line);
}
.ds-main thead th {
	background: var(--ds-teal);
	color: var(--ds-white);
	font-family: var(--ds-font-body);
}
.ds-main tbody tr:nth-child(even) { background: var(--ds-cream); }

/* ---- System messages / alerts -------------------------------------- */
#system-message-container { margin-bottom: 1.5rem; }
.alert {
	border-radius: var(--ds-radius-sm);
	border: 1px solid var(--ds-line);
	padding: 1rem 1.15rem;
	margin-bottom: 1rem;
	background: var(--ds-white);
}
.alert-success { border-left: 6px solid var(--ds-sage); background: #f1f5f0; }
.alert-info    { border-left: 6px solid var(--ds-slate); background: #eef3f5; }
.alert-warning { border-left: 6px solid var(--ds-peach); background: #fdf2e7; }
.alert-danger, .alert-error { border-left: 6px solid #b4472f; background: #fbece7; }
.alert__close, .btn-close {
	background: transparent; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--ds-ink-soft);
}

/* ---- Footer --------------------------------------------------------- */
.ds-footer { margin-top: auto; }
.ds-footer__cols {
	background: var(--ds-teal);
	color: var(--ds-cream);
	padding-block: clamp(2rem, 5vw, 3rem);
}
.ds-footer__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.5rem, 4vw, 3rem);
}
@media (max-width: 780px) { .ds-footer__grid { grid-template-columns: 1fr; } }
.ds-footer__cols h3, .ds-footer__cols h4 { color: var(--ds-white); }
.ds-footer__cols a { color: var(--ds-mist); }
.ds-footer__cols a:hover { color: var(--ds-white); }
.ds-footer__cols ul { list-style: none; padding: 0; margin: 0; }
.ds-footer__cols li { padding: 0.25rem 0; }

.ds-footer__bar {
	background: var(--ds-teal-900);
	color: var(--ds-mist);
	padding-block: 1.1rem;
	font-size: 0.95rem;
}
.ds-footer__bar-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	align-items: center;
	justify-content: space-between;
}
.ds-footer__text { max-width: 60ch; }
.ds-footer__copy { margin: 0; }
.ds-footer__legal { flex-basis: 100%; margin: 0; font-size: 0.82rem; opacity: 0.85; }

/* ---- Error & offline pages ----------------------------------------- */
.ds-body--error, .ds-body--offline {
	display: grid;
	place-items: center;
	min-height: 100vh;
	padding: 2rem;
	background:
		radial-gradient(900px 340px at 50% -10%, rgba(232,170,111,0.18), transparent 60%),
		var(--ds-cream);
}
.ds-error__card, .ds-offline__card {
	background: var(--ds-white);
	border: 1px solid var(--ds-line);
	border-radius: var(--ds-radius);
	box-shadow: var(--ds-shadow-lg);
	padding: clamp(2rem, 5vw, 3.5rem);
	max-width: 560px;
	text-align: center;
}
.ds-error__code {
	font-family: var(--ds-font-head);
	font-size: clamp(3.5rem, 10vw, 6rem);
	color: var(--ds-peach);
	line-height: 1;
	margin: 0 0 0.25em;
}
.ds-error__lead, .ds-offline__lead { color: var(--ds-ink-soft); font-size: 1.15rem; }
.ds-error__debug {
	text-align: left;
	background: var(--ds-cream);
	border-radius: var(--ds-radius-sm);
	padding: 1rem;
	margin: 1.5rem 0;
	font-size: 0.85rem;
	overflow: auto;
}
.ds-offline__login { margin-top: 1.5rem; }

/* ---- Utility -------------------------------------------------------- */
.ds-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

/* ---- Login (com_users override) ------------------------------------ */
.dedsafe-login { padding-block: clamp(1rem, 4vw, 2.5rem); }
.dedsafe-login__card {
	max-width: 460px; margin-inline: auto;
	background: var(--ds-white); border: 1px solid var(--ds-line);
	border-radius: var(--ds-radius); box-shadow: var(--ds-shadow-lg);
	padding: clamp(1.75rem, 4vw, 2.5rem);
}
.dedsafe-login__title { text-align: center; margin: 0 0 0.4rem; }
.dedsafe-login__lead { text-align: center; color: var(--ds-ink-soft); margin: 0 0 1.5rem; }
.dedsafe-login__card .control-group { margin-bottom: 1.1rem; }
.dedsafe-login__card label { display: block; margin-bottom: 0.35rem; font-size: 1.05rem; }
.dedsafe-login__card .control-label label { margin-bottom: 0.35rem; }
.dedsafe-login__card .input-group { display: flex; gap: 0.5rem; align-items: stretch; }
.dedsafe-login__card .input-group > input { flex: 1 1 auto; }
/* Tame the password show/hide toggle so it isn't a giant block */
.dedsafe-login__card .input-group .btn,
.dedsafe-login__card .input-group button,
.dedsafe-login__card .input-group-text {
	min-height: 0; padding: 0 0.85rem; font-size: 0.9rem; font-weight: 600;
	background: var(--ds-mist); color: var(--ds-teal); border: 1px solid var(--ds-slate);
	border-radius: var(--ds-radius-sm); white-space: nowrap; cursor: pointer;
}
.dedsafe-login__remember { display: flex; align-items: center; gap: 0.5rem; margin: 0.25rem 0 1.25rem; }
.dedsafe-login__remember input { width: auto; min-height: 0; }
.dedsafe-login__remember label { margin: 0; font-weight: 500; color: var(--ds-ink); }
.dedsafe-login__actions { margin-bottom: 0.75rem; }
.dedsafe-login__submit { width: 100%; font-size: 1.15rem; }
.dedsafe-login__extra { margin-bottom: 0.5rem; }
.dedsafe-login__passkey { width: 100%; }
.dedsafe-login__passkey img, .dedsafe-login__passkey svg { width: 20px; height: 20px; }
.dedsafe-login__options {
	display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; justify-content: center;
	margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--ds-line);
	font-size: 0.95rem;
}
.dedsafe-login__register { font-weight: 700; color: var(--ds-teal); }

/* ---- Header account / safe logout ---------------------------------- */
.ds-header__account { display: flex; align-items: center; gap: 0.5rem; }
.ds-header__safe {
	font-weight: 600; color: var(--ds-teal); text-decoration: none;
	padding: 0.5rem 0.75rem; border-radius: var(--ds-radius-sm); white-space: nowrap;
}
.ds-header__safe:hover { background: var(--ds-mist); }
.ds-header__logout { min-height: 44px; padding: 0.5rem 1rem; white-space: nowrap; }
@media (max-width: 600px) {
	.ds-header__safe { display: none; }
	.ds-header__logout .ds-header__logout-text { display: none; }
}

/* social icons in footer */
.ds-footer__social{display:inline-flex;gap:10px;margin-right:14px;vertical-align:middle;}
.ds-footer__social a{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.10);color:#dfe9ec;transition:background .2s,color .2s;text-decoration:none;}
.ds-footer__social a:hover{background:#e8aa6f;color:#4a3204;}
.ds-footer__social svg{width:20px;height:20px;fill:currentColor;}

/* Blog and Recommended Partners */
.ds-blog { max-width: 980px; margin: 0 auto; }
.ds-blog__title { font-size: clamp(1.9rem, 4vw, 2.6rem); color: #0e4251; margin: 0 0 .4rem; }
.ds-blog__intro { font-size: 1.15rem; color: #597885; max-width: 60ch; }
.ds-blog__empty, .ds-blog__note { color: #597885; font-size: 1.05rem; }
.ds-posts { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; gap: 18px; }
.ds-post { display: grid; grid-template-columns: 220px 1fr; gap: 18px; background: #fff; border: 1px solid #e4dccf; border-radius: 18px; overflow: hidden; }
.ds-post:not(:has(.ds-post__pic)) { grid-template-columns: 1fr; }
.ds-post__pic img { width: 100%; height: 100%; object-fit: cover; min-height: 160px; display: block; }
.ds-post__body { padding: 16px 20px 18px; }
.ds-post__date { margin: 0 0 4px; color: #597885; font-size: .95rem; }
.ds-post__title { margin: 0 0 8px; font-size: 1.45rem; line-height: 1.25; }
.ds-post__title a { color: #0e4251; text-decoration: none; }
.ds-post__title a:hover, .ds-post__title a:focus { text-decoration: underline; }
.ds-post__intro { font-size: 1.08rem; line-height: 1.6; margin: 0 0 10px; }
.ds-post__more { font-weight: 800; color: #0e4251; }
@media (max-width: 640px) { .ds-post { grid-template-columns: 1fr; } }
.ds-partners { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.ds-partner { background: #fff; border: 1px solid #e4dccf; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.ds-partner__logo { height: 72px; display: flex; align-items: center; }
.ds-partner__logo img { max-height: 72px; max-width: 180px; object-fit: contain; }
.ds-partner__logo span { width: 64px; height: 64px; border-radius: 16px; background: #cbd1c5; color: #0e4251; font-weight: 800; font-size: 1.8rem; display: grid; place-items: center; }
.ds-partner__name { margin: 0; font-size: 1.25rem; color: #0e4251; }
.ds-partner__text { color: #14313a; line-height: 1.55; flex: 1; }
.ds-partner__go { align-self: flex-start; font-weight: 800; color: #fff; background: #0e4251; border-radius: 12px; padding: 10px 16px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.ds-article { max-width: 720px; margin: 0 auto; font-size: 1.15rem; line-height: 1.75; }
.ds-article__title { font-size: clamp(1.9rem, 4vw, 2.5rem); color: #0e4251; line-height: 1.2; margin: .3rem 0; }
.ds-article__date { color: #597885; margin: 0 0 1rem; }
.ds-article__pic { width: 100%; border-radius: 16px; margin: 0 0 1.2rem; }
.ds-article__back a { font-weight: 700; }
.ds-footlinks { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin: 0 0 10px; }
.ds-footlinks a { font-weight: 700; }
.ds-footlinks a, .foot-links a { color: #e8aa6f; text-decoration: underline; text-underline-offset: 3px; }
.ds-footlinks a:hover, .ds-footlinks a:focus, .foot-links a:hover { color: #fff; }
.foot-links { width: 100%; margin: 0 0 6px; }

/* Her photo in a small circle beside "My Safe" */
.ds-header__me { display: inline-flex; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 3px solid var(--ds-peach, #e8aa6f); margin-right: 8px; vertical-align: middle; flex: 0 0 44px; }
.ds-header__me img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Phones: logo on its own line (never squeezed), buttons on a line below ---- */
.ds-brand__logo { flex-shrink: 0; max-width: 100%; object-fit: contain; }
@media (max-width: 600px) {
	.ds-header__inner { flex-wrap: wrap; row-gap: 0.65rem; padding-block: 0.7rem; }
	.ds-brand { flex: 0 0 100%; margin-right: 0; justify-content: center; }
	.ds-brand__logo { height: 46px; width: auto; }
	.ds-header__inner { column-gap: 0.5rem; }
	.ds-nav-toggle { order: 2; flex: 0 0 auto; justify-content: center; min-height: 48px; }
	.ds-header__search { order: 4; flex: 0 0 100%; }
	.ds-header__account { order: 3; flex: 1 1 0; min-width: 0; }
	.ds-header__account .ds-header__logout { flex: 1 1 auto; justify-content: center; min-height: 48px; padding-inline: 0.75rem; }
}

/* ---- Phone menu panel filled with DedSafe's own pages (only inside the phone panel) ---- */
.ds-phonenav { display: none; }
@media (max-width: 860px) {
	.ds-phonenav { display: block; }
	.ds-phonenav ul { list-style: none; margin: 0 0 0.4rem; padding: 0; display: flex; flex-direction: column; gap: 0.1rem; }
	.ds-phonenav a { display: block; padding: 0.8rem 0.9rem; border-radius: 12px; font-size: 1.1rem; font-weight: 600; color: var(--ds-teal); text-decoration: none; }
	.ds-phonenav a:hover, .ds-phonenav a:focus-visible { background: var(--ds-mist); }
	.ds-phonenav__top { border-bottom: 2px solid var(--ds-line); padding-bottom: 0.5rem !important; margin-bottom: 0.6rem !important; }
	.ds-phonenav__h { margin: 0.9rem 0.9rem 0.2rem; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ds-ink-soft); }
}

/* A clear "Close" button at the top of the phone menu */
.ds-nav__close { display: none; }
@media (max-width: 860px) {
	.ds-nav { padding-top: 1rem; }
	.ds-nav__close { display: inline-flex; align-items: center; gap: 0.5rem; margin: calc(env(safe-area-inset-top, 0px) + 0.25rem) 0 0.9rem auto; float: right;
		min-height: 48px; padding: 0.6rem 1.1rem; border: 2px solid var(--ds-teal); border-radius: 12px; background: #fff; color: var(--ds-teal); font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
	.ds-nav__close + * { clear: both; }
}

/* ---- Blog bylines and help box (1.1.16) ---------------------------- */
.ds-article__byline { margin: 0; font-weight: 700; color: var(--ds-teal); }
.ds-article__cred { margin: 0.2rem 0 0.4rem; font-size: 0.95rem; color: var(--ds-slate-text); }
.ds-article__help { margin: 2.5rem 0 0; padding: 1.3rem 1.5rem; background: #f3f6f1; border-left: 5px solid var(--ds-sage-strong); border-radius: 0 14px 14px 0; }
.ds-article__help h2 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.ds-article__help p { margin: 0.4rem 0 0; }
.ds-article__help-go { font-weight: 700; }
