/* Ping My Pet: an English country outfitters' shop front.
   Hunter-green fascia with gilt lettering, oatmeal paper, ivory labels framed with a
   double rule, brass for the tag itself, and oxblood for anything urgent.
   Type is Caslon, the classic 18th-century English face, hosted on this site. */

@font-face { font-family: "Caslon Display"; src: url("/fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Caslon Text"; src: url("/fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Caslon Text"; src: url("/fonts/libre-caslon-text-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #EDE6D6;        /* oatmeal page */
  --ivory: #FBF8F0;        /* label / card */
  --hunter: #1F3A2C;       /* fascia, primary actions */
  --hunter-dark: #142A1F;
  --gilt: #D9B866;         /* lettering on green */
  --brass: #B08A3E;
  --brass-dark: #7E6127;
  --oxblood: #7A2424;
  --ink: #23211B;
  --muted: #5D5848;
  --line: #CFC3A8;
  --tint: #F1EFE4;
  --display: "Caslon Display", "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --text: "Caslon Text", "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --page: 42rem;
  --gutter: max(1.25rem, calc((100% - var(--page)) / 2));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--text);
}
body.lost { --paper: #EFDFD8; }

a { color: var(--hunter); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--oxblood); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0 0 .45em; color: var(--hunter-dark); text-wrap: balance; }
h1 { font-size: clamp(2rem, 6.5vw, 2.75rem); }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }

/* --- The fascia ---------------------------------------------------------------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem var(--gutter);
  background: var(--hunter);
}
.menu-bar {
  display: flex; justify-content: center; gap: .25rem 2rem; flex-wrap: wrap;
  padding: .55rem var(--gutter) .6rem;
  background: var(--hunter-dark);
  border-bottom: 4px solid var(--brass);
  box-shadow: 0 2px 0 var(--hunter-dark);
}
.menu-bar a {
  color: var(--ivory); text-decoration: none; font-size: 1rem; letter-spacing: .02em; white-space: nowrap;
  padding: .15rem 0; border-bottom: 2px solid transparent;
}
.menu-bar a:hover { color: var(--gilt); }
.menu-bar a[aria-current="page"] { color: var(--gilt); border-bottom-color: var(--gilt); }
.brand {
  font: 400 1.65rem/1 var(--display);
  color: var(--gilt);
  text-decoration: none;
  letter-spacing: .02em;
}
.brand:hover { color: #F0D99A; }
.site-header nav { display: flex; gap: 1.1rem; align-items: center; font-size: 1rem; }
.site-header nav a, .site-header .link-button { color: var(--ivory); }
.site-header nav a:hover, .site-header .link-button:hover { color: var(--gilt); }

main { max-width: var(--page); margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.site-footer {
  max-width: var(--page); margin: 0 auto; padding: 1.5rem 1.25rem 3rem;
  text-align: center; font-size: .95rem; color: var(--muted);
}
.site-footer::before { content: "❦"; display: block; color: var(--brass); font-size: 1.4rem; margin-bottom: .5rem; }

/* --- Labels: ivory, framed with a double rule ---------------------------------- */
.panel {
  background: var(--ivory);
  border: 3px double var(--line);
  border-radius: 3px;
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.25rem;
}
.panel > :last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }

.flash { padding: .85rem 1.1rem; margin-bottom: 1.1rem; background: var(--ivory); border: 1px solid var(--line); border-left: 5px solid; }
.flash.success { border-left-color: var(--hunter); }
.flash.error { border-left-color: var(--oxblood); }

/* --- Forms ------------------------------------------------------------------------ */
label { display: block; font-weight: 700; margin: 1.1rem 0 .3rem; }
label .hint { display: block; font-weight: 400; color: var(--muted); font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=file], textarea {
  width: 100%; font: inherit; color: inherit; padding: .7rem .8rem;
  border: 1px solid #B9AC8E; border-radius: 3px; background: #FFFDF8;
  box-shadow: inset 0 1px 2px rgba(60, 45, 20, .08);
}
input:focus, textarea:focus { border-color: var(--hunter); outline: 2px solid rgba(31, 58, 44, .25); outline-offset: 0; }
textarea { min-height: 7rem; resize: vertical; }
::placeholder { color: #9A927E; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .35rem; width: 1.1rem; height: 1.1rem; accent-color: var(--hunter); flex: none; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.button {
  display: inline-block; cursor: pointer; text-decoration: none; text-align: center;
  font: 700 1rem/1.2 var(--text); letter-spacing: .02em;
  padding: .85rem 1.4rem; margin-top: 1.25rem;
  border: 1px solid var(--hunter-dark); border-radius: 3px;
  background: var(--hunter); color: var(--ivory);
  box-shadow: inset 0 0 0 1px rgba(217, 184, 102, .35);
}
.button:hover { background: var(--hunter-dark); color: var(--gilt); }
.button.secondary { background: transparent; color: var(--hunter); border-color: var(--hunter); box-shadow: none; }
.button.secondary:hover { background: var(--hunter); color: var(--ivory); }
.button.danger { background: transparent; color: var(--oxblood); border-color: var(--oxblood); box-shadow: none; }
.button.danger:hover { background: var(--oxblood); color: var(--ivory); }
.button.block { display: block; width: 100%; }
.button:disabled { opacity: .6; cursor: wait; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--hunter); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.inline { display: inline; }

/* --- Home page ------------------------------------------------------------------------ */
.hero { display: grid; grid-template-columns: 1fr; gap: .5rem 2rem; align-items: center; padding: .5rem 0 2rem; }
.hero-tag { width: 104px; height: auto; }
.hero h1 { font-size: clamp(2.4rem, 9vw, 3.6rem); line-height: 1.04; margin-bottom: .35em; }
.hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 32rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-actions .button { margin-top: .25rem; }
@media (min-width: 640px) {
  .hero { grid-template-columns: 1fr auto; }
  .hero > * { grid-column: 1; }
  .hero > .hero-tag { grid-column: 2; grid-row: 1 / span 3; width: 170px; }
}
.steps { margin: 0; padding-left: 1.4rem; }
.steps li { padding-left: .3rem; }
.steps li::marker { font-family: var(--display); color: var(--brass-dark); font-size: 1.15em; }
.steps li + li { margin-top: .7rem; }

/* --- The pet's page: the brass tag is the centrepiece ---------------------------------- */
.profile { text-align: center; padding-top: .5rem; }
.tag-disc {
  position: relative; width: min(16rem, 72vw); aspect-ratio: 1; margin: 2.75rem auto 1.4rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #E9D08E, #B08A3E 55%, #8A6A2C);
  padding: 12px;
  box-shadow: 0 6px 14px rgba(60, 40, 10, .25), inset 0 0 0 2px #E8CF8A, inset 0 0 0 4px var(--brass-dark);
}
.tag-disc img, .tag-disc .initial {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--brass-dark);
}
.tag-disc .initial { background: var(--ivory); font: 400 5rem var(--display); color: var(--brass-dark); }
.tag-disc::before {
  content: ""; position: absolute; top: -1.7rem; left: 50%; translate: -50% 0;
  width: 2rem; height: 2rem; border-radius: 50%; border: 5px solid var(--brass);
  box-shadow: inset 0 0 0 1px var(--brass-dark), 0 0 0 1px var(--brass-dark);
}
.pet-name { font-size: clamp(2.8rem, 12vw, 4.2rem); margin-bottom: .2em; }
.owner-message { font-size: 1.2rem; max-width: 32rem; margin: 0 auto 1.75rem; }
.lost-banner {
  background: var(--oxblood); color: var(--ivory); padding: 1rem 1.25rem; margin-bottom: 1rem;
  border: 3px double rgba(251, 248, 240, .5); border-radius: 3px;
  font: 700 1.1rem/1.4 var(--text);
}
.notes { text-align: left; }

.caller + .caller { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.caller-name { margin: 0 0 .5rem; font-size: 1.1rem; }
.caller-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.caller-buttons .button { margin-top: 0; }
.privacy-note { border-top: 1px solid var(--line); padding-top: .8rem; }

/* --- Dashboard & edit page ------------------------------------------------------------------ */
.pet-row { display: flex; gap: 1rem; align-items: center; }
.pet-row + .pet-row { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.thumb {
  width: 4.25rem; height: 4.25rem; border-radius: 50%; object-fit: cover; flex: none;
  border: 4px solid var(--brass); box-shadow: 0 0 0 1px var(--brass-dark);
  background: var(--ivory); display: grid; place-items: center;
  font: 400 1.7rem var(--display); color: var(--brass-dark);
}
.pet-row .info { flex: 1; min-width: 0; }
.pet-row h3 { margin: 0 0 .15rem; font-size: 1.5rem; }
.pet-row .actions { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .95rem; margin-top: .35rem; }
.badge { display: inline-block; font: 700 .78rem/1.4 var(--text); padding: .1rem .55rem; border-radius: 2px; background: var(--oxblood); color: var(--ivory); vertical-align: middle; }
.current-photo { width: 7rem; height: 7rem; border-radius: 50%; object-fit: cover; border: 5px solid var(--brass); box-shadow: 0 0 0 1px var(--brass-dark); }
.verify-banner { border-color: var(--brass); }

.contact-row { display: flex; flex-direction: column; gap: .35rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.contact-row .info { min-width: 0; overflow-wrap: anywhere; }
.contact-row .actions { display: flex; gap: 1.1rem; font-size: .95rem; }
.add-contact { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }

.choice { border: 0; padding: 0; margin: 1.25rem 0 0; }
.choice legend { font-weight: 700; margin-bottom: .4rem; padding: 0; }
.choice .check { margin: .6rem 0 0; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 3px; background: #FFFDF8; }
.choice .check:has(input:checked) { border-color: var(--hunter); background: var(--tint); box-shadow: inset 3px 0 0 var(--hunter); }
.choice .hint { display: block; font-weight: 400; color: var(--muted); font-size: .92rem; margin-top: .2rem; }

/* --- Admin -------------------------------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th, td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; }
.qc-ok { font: 400 3rem var(--display); color: var(--hunter); margin: 0; }
.qc-banner { background: var(--brass); color: var(--hunter-dark); text-align: center; padding: .45rem; font-weight: 700; font-size: .92rem; }
.new-code { border-color: var(--brass); }
.activation-code { font: 700 2rem/1.2 ui-monospace, Menlo, monospace; letter-spacing: .06em; margin: .25rem 0 .75rem; }

/* --- Utilities (the security policy blocks inline style attributes) ------------------------------ */
.scroll-x { overflow-x: auto; }
.center { text-align: center; }
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }

@media (prefers-reduced-motion: no-preference) {
  .button, a { transition: background-color .15s, color .15s; }
}
.brand, .site-header nav a, .site-header .link-button { white-space: nowrap; }
@media (max-width: 420px) {
  .panel { padding: 1.25rem 1.1rem; }
  .site-header { padding-inline: 1rem; gap: .75rem; }
  .brand { font-size: 1.3rem; }
  .site-header nav { gap: .8rem; font-size: .93rem; }
}

/* --- Shop ------------------------------------------------------------------------------- */
.shop-intro { padding: .25rem 0 1rem; }
.shop-intro .lede { font-size: 1.15rem; color: var(--muted); }
.products { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
@media (min-width: 620px) { .products { grid-template-columns: 1fr 1fr; } }
.product {
  background: var(--ivory); border: 3px double var(--line); border-radius: 3px;
  padding: 1.25rem 1.4rem 1.4rem; text-align: center; display: flex; flex-direction: column;
}
.product-art { width: 62%; max-width: 190px; height: auto; margin: 0 auto .75rem; filter: drop-shadow(0 6px 8px rgba(60, 40, 10, .22)); }
.product h2 { font-size: 2rem; margin-bottom: .1em; }
.product-material { color: var(--muted); margin-bottom: .4rem; }
.product-price { font: 400 1.8rem/1.2 var(--display); color: var(--hunter-dark); margin-bottom: .6rem; }
.product-details { list-style: none; padding: 0; margin: 0 0 auto; font-size: .97rem; }
.product-details li { padding: .3rem 0; border-top: 1px solid var(--line); }
.product .button { margin-top: 1.1rem; }
.button.disabled { background: transparent; color: var(--muted); border-color: var(--line); box-shadow: none; cursor: default; }
.faq details { border-top: 1px solid var(--line); padding: .7rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--hunter-dark); }
.faq summary::marker { color: var(--brass-dark); }
.faq details p { margin: .6rem 0 .2rem; }

/* --- Wall of fame -------------------------------------------------------------------------- */
.wall-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 11rem)); justify-content: center; gap: 1.4rem 1rem; }
.wall-grid-small { grid-template-columns: repeat(3, 1fr); gap: 1rem .75rem; }
.wall-card { margin: 0; text-align: center; }
.wall-card img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; display: block;
  border: 5px solid var(--brass); box-shadow: 0 0 0 1px var(--brass-dark), 0 4px 10px rgba(60, 40, 10, .18);
  background: var(--ivory);
}
.wall-card figcaption { font: 400 1.3rem/1.2 var(--display); color: var(--hunter-dark); margin-top: .55rem; overflow-wrap: anywhere; }
.wall-grid-small .wall-card figcaption { font-size: 1.1rem; }
.wall-paging { display: flex; justify-content: space-between; margin-top: 1.5rem; }
.review-row { display: flex; gap: 1rem; align-items: center; padding: .9rem 0; border-top: 1px solid var(--line); }
.review-row img { width: 6rem; height: 6rem; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); flex: none; }
.review-actions { display: flex; gap: .6rem; margin-top: .5rem; flex-wrap: wrap; }
.review-actions .button { padding: .55rem 1rem; }

/* Wall of fame tickbox, under the photo on the edit page */
.wall-choice { margin-top: 1rem; padding: .85rem .9rem; border: 1px solid var(--line); border-radius: 3px; background: #FFFDF8; }
.wall-choice .check { margin: 0; }
.wall-choice:has(input:checked) { border-color: var(--brass); background: var(--tint); }
.wall-status { margin: .6rem 0 0 1.75rem; color: var(--hunter-dark); font-weight: 700; }

/* Privacy policy */
.privacy h2 { margin-top: 1.6rem; }
.privacy ul { padding-left: 1.3rem; margin: 0 0 1em; }
.privacy li + li { margin-top: .4rem; }

/* --- Most Wanted: old wanted posters ---------------------------------------------------- */
.wanted-crime-label { margin-top: .9rem; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 12.5rem)); justify-content: center; gap: 1.3rem 1rem; }
.poster {
  margin: 0; padding: .7rem .7rem .85rem; text-align: center; container-type: inline-size; overflow: hidden;
  background: #F2E3C4; border: 1px solid #C9AE7C;
  box-shadow: 0 6px 12px rgba(60, 40, 10, .18);
  transform: rotate(-1.2deg);
}
.poster:nth-child(even) { transform: rotate(1deg); }
.poster:nth-child(3n) { transform: rotate(-.4deg); }
.poster-head { font: 400 1.5rem/1 var(--display); font-size: 19cqi; color: #4A2E12; letter-spacing: .08em; padding-left: .08em; text-transform: uppercase; margin: 0 0 .55rem; }
.poster img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border: 3px solid #4A2E12; filter: sepia(.35) contrast(1.05); background: #E8D6B0; }
.poster figcaption { display: flex; flex-direction: column; gap: .2rem; margin-top: .6rem; color: #3A2410; }
.poster-name { font: 400 1.3rem/1.1 var(--display); font-size: 12.5cqi; overflow-wrap: anywhere; }
.poster-crime { font-size: .88rem; line-height: 1.3; overflow-wrap: anywhere; }
.poster-reward { font-weight: 700; font-size: .8rem; border-top: 1px dashed #A88A55; padding-top: .35rem; margin-top: .2rem; }
@media (max-width: 400px) {
  .menu-bar { gap: .25rem 1.1rem; }
  .menu-bar a { font-size: .93rem; }
}

/* Kennel icon next to the name in the header (links home) */
.brand { display: inline-flex; align-items: center; gap: .5rem; }
.brand-icon { width: 1.8rem; height: 1.8rem; flex: none; transform: translateY(-1px); }
@media (max-width: 400px) { .brand { gap: .4rem; } .brand-icon { width: 1.3rem; height: 1.3rem; } }

/* --- About ---------------------------------------------------------------------------- */
.about-photo { width: min(15rem, 66vw); aspect-ratio: 1; margin: .5rem auto 1.5rem; border-radius: 50%;
  padding: 10px; background: radial-gradient(circle at 35% 30%, #E9D08E, #B08A3E 55%, #8A6A2C);
  box-shadow: 0 6px 14px rgba(60, 40, 10, .22); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.about .about-intro { font: 400 1.7rem/1.25 var(--display); color: var(--hunter-dark); }
.about p { font-size: 1.1rem; }
.about .about-signoff { font: 400 1.9rem/1 var(--display); color: var(--brass-dark); margin-top: 1.5rem; }
/* Four menu items: a neat two-by-two on small phones */
@media (max-width: 420px) {
  .menu-bar { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: .3rem 1.6rem; text-align: center; }
}

/* Home town under the pet's name */
.profile .home-town { margin: -.1rem 0 1rem; color: var(--muted); font-size: 1.05rem; letter-spacing: .02em; }

/* Second "Save changes" under the contacts on the pet's page */
.save-bar { margin: 0 0 1.25rem; text-align: center; }
.save-bar .button { margin-top: 0; }
.save-bar p { margin: .5rem 0 0; }
.hidden { display: none; }
#contact-warning { margin: 1rem 0 0; }

/* "Add new contact": the boxes open when tapped, then the normal Save saves them */
.add-contact { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.add-contact > summary { display: inline-block; list-style: none; margin-top: 0; }
.add-contact > summary::-webkit-details-marker { display: none; }
.add-contact > summary::before { content: "+ "; }
.add-contact[open] > summary::before { content: "− "; }
.add-contact-fields { margin-top: .5rem; }
.add-contact-note { margin: 1rem 0 0; padding: .7rem .9rem; background: var(--tint); border-left: 4px solid var(--brass); }
