/* Dot on every page (inc/dot.php, assets/dot.js). Loaded only while the switch is on, and not on directory pages. */
.dot-panel, .dot-fab, .dot-nudge { --gold: #c9a57b; --gold-2: #e3c79f; --gold-soft: rgba(201, 165, 123, 0.14); --night: var(--ink, #0f1217); }

/* Dot himself: a dark disc with a 3 x 3 grid of gold dots. */
.dot-av { position: relative; display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #2c2824, var(--night) 70%); border: 1px solid rgba(201, 165, 123, 0.6); box-shadow: 0 0 0 4px rgba(201, 165, 123, 0.12); }
.dot-av::before { content: ""; width: 48%; height: 48%; background: radial-gradient(circle, var(--gold) 0 34%, transparent 38%) 0 0 / 33.333% 33.333%; }
.dot-av-sm { width: 22px; height: 22px; box-shadow: none; }
.dot-av-lg { width: 64px; height: 64px; box-shadow: 0 0 0 6px rgba(201, 165, 123, 0.12), 0 18px 40px -16px rgba(201, 165, 123, 0.7); }
.dot-av-lg::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid rgba(201, 165, 123, 0.5); animation: dot-ring 3.2s ease-out infinite; }
@keyframes dot-ring { from { transform: scale(0.92); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.dot-panel svg, .dot-fab svg, .dot-nudge svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* The button on larger screens (phones have Ask Dot in the tab bar). */
.dot-fab { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: none; align-items: center; gap: 12px; padding: 7px 22px 7px 7px; border: 1px solid rgba(201, 165, 123, 0.45); border-radius: var(--r-pill); background: linear-gradient(180deg, #1b1f27, var(--night)); color: #f7f4ef; font-family: var(--sans); text-align: left; box-shadow: 0 2px 4px rgba(15, 18, 23, 0.1), 0 24px 48px -20px rgba(15, 18, 23, 0.55); cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.dot-fab-t { display: flex; flex-direction: column; line-height: 1.15; }
.dot-fab-t b { font-size: 0.98rem; }
.dot-fab-t small { font-size: 0.74rem; color: var(--gold-2); letter-spacing: 0.02em; }
.dot-fab:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15, 18, 23, 0.1), 0 30px 56px -20px rgba(15, 18, 23, 0.6); }
.dot-fab:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (min-width: 901px) { .dot-fab { display: inline-flex; } }
.dot-open .dot-fab { visibility: hidden; }

/* The panel: a sheet from the bottom on phones, a window at the bottom right on larger screens. */
.dot-panel { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; height: min(90vh, 780px); height: min(90dvh, 780px); max-height: none; padding: 0; border: 0; border-radius: 26px 26px 0 0; background: var(--bone, #f7f4ef); color: var(--text); box-shadow: var(--shadow-lg); flex-direction: column; overflow: hidden; font-family: var(--sans); }
.dot-panel[open] { display: flex; animation: dot-up 0.32s var(--ease); }
.dot-panel::backdrop { background: rgba(15, 18, 23, 0.5); backdrop-filter: blur(2px); }
@keyframes dot-up { from { transform: translateY(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 901px) {
	.dot-panel { inset: auto 24px 24px auto; width: 440px; height: min(82vh, 760px); border-radius: 26px; }
	.dot-panel::backdrop { background: rgba(15, 18, 23, 0.2); backdrop-filter: none; }
}

/* Header */
.dot-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; background: radial-gradient(120% 140% at 0% 0%, #2a2620 0%, var(--night) 60%); color: #f7f4ef; }
.dot-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(201, 165, 123, 0.5), transparent); }
.dot-id { min-width: 0; flex: 1; }
.dot-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font: 400 1.55rem/1 var(--serif); color: #fff; }
.dot-badge { padding: 3px 7px; border-radius: var(--r-pill); background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #0b0c0f; font: 700 0.58rem/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.dot-sub { margin: 4px 0 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.8rem; color: #cfc7bb; }
.dot-tools { display: flex; gap: 2px; }
.dot-ic { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #e9e2d6; cursor: pointer; transition: background 0.15s; }
.dot-ic:hover { background: rgba(255, 255, 255, 0.08); }
.dot-ic.dot-x { background: rgba(255, 255, 255, 0.08); }
.dot-ic:focus-visible { outline: 3px solid var(--gold); outline-offset: -2px; }

/* The scrolling area */
.dot-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 18px; overscroll-behavior: contain; scroll-padding-top: 12px; }
.dot-eyebrow { margin: 0 0 8px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bronze-2, #8a5a33); }
.dot-eyebrow-sp { margin-top: 4px; }
.dot-small { margin: 6px 0 0; font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.dot-link { min-height: 36px; padding: 0 6px; border: 0; background: none; color: inherit; font: 600 0.82rem var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Opening screen */
.dot-home { display: flex; flex-direction: column; gap: 22px; }
.dot-greet { text-align: center; padding: 6px 8px 0; }
.dot-greet h3 { margin: 16px 0 6px; font: 400 2rem/1.05 var(--serif); color: var(--ink); }
.dot-greet h3 em { color: var(--bronze, #a8744a); }
.dot-greet p { margin: 0 auto; max-width: 34ch; font-size: 0.92rem; line-height: 1.5; color: var(--text-2, #50565f); }
.dot-block { display: flex; flex-direction: column; }
.dot-card { padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper, #fff); box-shadow: var(--shadow-sm); }
.dot-ask-mem { border-color: rgba(201, 165, 123, 0.55); background: linear-gradient(180deg, #fffaf3, #fff); }
.dot-ask-mem h4 { margin: 0; font: 400 1.25rem/1.2 var(--serif); color: var(--ink); }
.dot-ask-mem.is-compact h4 { font-size: 1.1rem; }
.dot-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.dot-facts span { padding: 4px 10px; border-radius: var(--r-pill); background: var(--gold-soft); color: var(--bronze-2, #8a5a33); font-size: 0.78rem; font-weight: 600; }
.dot-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dot-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--ink); border-radius: var(--r-pill); background: var(--ink); color: #fff; font: 600 0.88rem/1 var(--sans); cursor: pointer; text-decoration: none; }
.dot-btn svg { color: var(--gold-2); }
.dot-btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2, #d6cdbf); }
.dot-btn:focus-visible, .dot-chip:focus-visible, .dot-tile:focus-visible, .dot-feature:focus-visible, .dot-toc button:focus-visible, .dot-clinic:focus-visible, .dot-guides a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.dot-mem { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border-radius: 16px; background: var(--green-soft, #e5f1ea); color: var(--green, #2e7a5c); font-size: 0.86rem; }
.dot-mem > div { flex: 1; min-width: 0; }
.dot-mem .dot-facts { margin-top: 6px; }
.dot-mem .dot-facts span { background: rgba(46, 122, 92, 0.12); color: var(--green, #2e7a5c); }

.dot-feature { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 14px 14px 12px; border: 0; border-radius: 18px; background: radial-gradient(120% 160% at 0% 0%, #2a2620, var(--night) 65%); color: #fff; text-align: left; font-family: var(--sans); cursor: pointer; box-shadow: 0 16px 32px -20px rgba(15, 18, 23, 0.7); transition: transform 0.15s var(--ease); }
.dot-feature:hover { transform: translateY(-1px); }
.dot-feature b { display: block; font-size: 0.98rem; }
.dot-feature small { display: block; margin-top: 2px; font-size: 0.8rem; color: #cfc7bb; }
.dot-feature > span:nth-child(2) { flex: 1; }
.dot-feature-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(201, 165, 123, 0.16); color: var(--gold-2); }
.dot-feature > svg { color: var(--gold-2); }
.dot-toc { margin: 10px 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 18px; background: var(--paper, #fff); overflow: hidden; }
.dot-toc li + li { border-top: 1px solid var(--line); }
.dot-toc button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 10px 12px 10px 14px; border: 0; background: none; color: var(--text); font: 500 0.9rem/1.3 var(--sans); text-align: left; cursor: pointer; transition: background 0.15s; }
.dot-toc button:hover { background: #fbf8f3; }
.dot-num { flex: none; font: 400 1.05rem/1 var(--serif); color: var(--bronze, #a8744a); min-width: 1.4em; }
.dot-toc-t { flex: 1; }
.dot-toc svg { color: var(--muted); }
.dot-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dot-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 104px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper, #fff); color: var(--text); text-align: left; font-family: var(--sans); cursor: pointer; transition: border-color 0.15s, transform 0.15s var(--ease); }
.dot-tile:hover { border-color: var(--gold); transform: translateY(-1px); }
.dot-tile > span { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 8px; border-radius: 11px; background: var(--gold-soft); color: var(--bronze-2, #8a5a33); }
.dot-tile b { font-size: 0.95rem; }
.dot-tile small { font-size: 0.78rem; color: var(--muted); }

.dot-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dot-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 15px; border: 1px solid var(--line-2, #d6cdbf); border-radius: var(--r-pill); background: var(--paper, #fff); color: var(--text); font: 500 0.86rem/1.2 var(--sans); cursor: pointer; white-space: nowrap; transition: border-color 0.15s, background 0.15s; }
.dot-chip:hover { border-color: var(--gold); background: #fffaf3; }
.dot-chip-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.dot-chip-on svg { color: var(--gold-2); }

/* Messages */
.dot-msg { animation: dot-in 0.28s var(--ease); }
@keyframes dot-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dot-me { display: flex; justify-content: flex-end; }
.dot-me p { margin: 0; max-width: 82%; padding: 11px 16px; border-radius: 20px 20px 6px 20px; background: var(--ink); color: #fff; font-size: 0.95rem; line-height: 1.45; }
.dot-ai { display: flex; flex-direction: column; gap: 12px; }
.dot-who { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.78rem; font-weight: 700; color: var(--text-2, #50565f); }
.dot-ans { padding: 14px 16px; border-radius: 18px; background: var(--paper, #fff); border: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--gold), var(--shadow-sm); }
.dot-ans p:not(.dot-eyebrow) { margin: 0 0 8px; font-size: 0.97rem; line-height: 1.6; color: var(--text); }
.dot-ans p:last-child { margin-bottom: 0; }
.dot-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--bronze-2, #8a5a33); font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.dot-more svg { width: 15px; height: 15px; }
.dot-reply p { margin: 0 0 6px; font-size: 0.93rem; line-height: 1.55; color: var(--text-2, #50565f); }
.dot-used { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--green-soft, #e5f1ea); color: var(--green, #2e7a5c); font-size: 0.84rem; font-weight: 600; }
.dot-think { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; padding: 12px 16px; border-radius: 18px; background: var(--paper, #fff); border: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; }
.dot-think i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: dot-bob 1.1s ease-in-out infinite; }
.dot-think i:nth-child(2) { animation-delay: 0.15s; }
.dot-think i:nth-child(3) { animation-delay: 0.3s; margin-right: 6px; }
@keyframes dot-bob { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.dot-clinics { display: flex; flex-direction: column; gap: 8px; }
.dot-clinic { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper, #fff); color: inherit; text-decoration: none; transition: border-color 0.15s, transform 0.15s var(--ease); }
.dot-clinic:hover { border-color: var(--gold); transform: translateY(-1px); }
.dot-thumb { flex: none; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; background: var(--sand, #e7dfd3); }
.dot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dot-init { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, hsl(var(--h) 30% 32%), hsl(var(--h) 28% 18%)); color: var(--gold-2); font: 400 1.4rem/1 var(--serif); }
.dot-clinic-t { flex: 1; min-width: 0; }
.dot-clinic b { display: block; font-size: 0.95rem; color: var(--ink); }
.dot-clinic small { display: block; margin-top: 2px; font-size: 0.78rem; color: var(--muted); }
.dot-clinic em { display: block; margin-top: 4px; font-style: normal; font-size: 0.82rem; line-height: 1.4; color: var(--text-2, #50565f); }
.dot-clinic > svg { color: var(--muted); }
.dot-top { display: inline-block; margin-bottom: 4px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--ink); color: var(--gold-2); font: 700 0.62rem/1.4 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; font-style: normal; }
.dot-all { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border: 1px dashed var(--line-2, #d6cdbf); border-radius: 16px; color: var(--ink); font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.dot-all:hover { border-color: var(--gold); border-style: solid; }
.dot-guides a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper, #fff); color: var(--text); text-decoration: none; font-size: 0.88rem; font-weight: 500; }
.dot-guides a + a { margin-top: 6px; }
.dot-guides a span { flex: 1; }
.dot-guides a svg:first-child { color: var(--bronze, #a8744a); }
.dot-guides a svg:last-child { color: var(--muted); }
.dot-row-sec { margin-top: 0; }
.dot-next { margin-top: 2px; }
@media (max-width: 700px) {
	.dot-scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
	.dot-scroll::-webkit-scrollbar { display: none; }
}

/* Composer */
.dot-dock { padding: 10px 12px calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(247, 244, 239, 0), var(--bone, #f7f4ef) 30%); }
.dot-form { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 16px; border: 1px solid var(--line-2, #d6cdbf); border-radius: 26px; background: var(--paper, #fff); box-shadow: 0 10px 30px -18px rgba(15, 18, 23, 0.35); transition: border-color 0.15s, box-shadow 0.15s; }
.dot-form:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 165, 123, 0.18); }
.dot-form textarea { flex: 1; min-height: 42px; max-height: 140px; padding: 10px 0; border: 0; outline: 0; resize: none; background: none; font: 16px/1.4 var(--sans); color: var(--text); }
.dot-send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ink); color: var(--gold-2); cursor: pointer; transition: opacity 0.15s, transform 0.15s; }
.dot-send:disabled { opacity: 0.35; cursor: default; }
.dot-send:not(:disabled):hover { transform: scale(1.05); }
.dot-send svg { width: 20px; height: 20px; stroke-width: 2.2; }
.dot-note { margin: 8px 0 0; font-size: 0.72rem; color: var(--muted); text-align: center; }

/* A part of the guide, shown after "Go to this part". */
.dot-flash { animation: dot-flash 2.2s var(--ease); border-radius: 6px; }
@keyframes dot-flash { 0%, 40% { background: rgba(201, 165, 123, 0.35); box-shadow: 0 0 0 8px rgba(201, 165, 123, 0.35); } 100% { background: transparent; box-shadow: 0 0 0 8px transparent; } }

/* The nudge, once per tab, halfway through a guide: above the tab bar on phones, above the button on larger screens. */
.dot-nudge { position: fixed; z-index: 61; right: 12px; left: 12px; bottom: calc(88px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 10px; border: 1px solid rgba(201, 165, 123, 0.45); border-radius: var(--r-pill); background: linear-gradient(180deg, #1b1f27, var(--night)); color: #f7f4ef; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.dot-nudge.on { opacity: 1; transform: none; }
.dot-nudge-go { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; border: 0; background: none; color: inherit; font: 500 0.92rem/1.3 var(--sans); text-align: left; cursor: pointer; }
.dot-nudge-go b { color: var(--gold-2); }
.dot-nudge-x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer; }
.dot-nudge button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (min-width: 901px) { .dot-nudge { left: auto; right: 24px; bottom: 92px; max-width: 360px; } }
.dot-open .dot-nudge { display: none; }

/* Learn mode: clinics wait behind one quiet row, after the answer and the guides. */
.dot-later { border: 1px solid var(--line); border-radius: 16px; background: var(--paper, #fff); overflow: hidden; }
.dot-later summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; cursor: pointer; list-style: none; }
.dot-later summary::-webkit-details-marker { display: none; }
.dot-later summary span { flex: 1; display: flex; flex-direction: column; }
.dot-later summary b { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.dot-later summary small { font-size: 0.8rem; color: var(--muted); }
.dot-later summary svg { width: 18px; height: 18px; color: var(--bronze, #a8744a); }
.dot-later summary svg:last-child { color: var(--muted); transition: transform .2s ease; }
.dot-later[open] summary svg:last-child { transform: rotate(180deg); }
.dot-later summary:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.dot-later .dot-clinics { padding: 0 8px 8px; }
@media (prefers-reduced-motion: reduce) {
	.dot-later summary svg:last-child { transition: none; }
	.dot-panel[open], .dot-msg, .dot-av-lg::after, .dot-think i { animation: none; }
	.dot-fab, .dot-nudge, .dot-feature, .dot-tile, .dot-clinic { transition: none; }
	.dot-flash { animation: none; outline: 3px solid var(--gold); }
}
.dot-locask { text-align: left; }
.dot-locask .dot-feature-ic { margin-bottom: 10px; background: var(--gold-soft); color: var(--bronze-2, #8a5a33); }
.dot-locask h4 { margin: 0; font: 400 1.3rem/1.2 var(--serif); color: var(--ink); }
/* Carried on from another page: this guide's key points and parts, set off from the earlier chat. */
.dot-now { margin-top: 6px; padding-top: 16px; border-top: 1px dashed var(--line); }
.dot-now .dot-block { margin: 0; }
