/* Site styles (NR-14, S-96, S-109). One file for every area, no external
   resources, no scripts, no imported files.

   Made from the approved prototype prototipai/variantas-a/styles.css
   without its "Būsenos" panel; since S-103 and S-104 the values are those
   of K1 (prototipai/pradzia-1/styles.css): ink, sand and dark brass, a
   2 px radius for buttons, cards and fields, headings of weight 500 in ink,
   labels in capitals, a 64 px header on the page background and a footer
   on the warm surface. Components that K1 does not have (forms, calendar,
   times, tables, lists) keep the layout of A with K1 values (P-78).
   Every colour, font, radius and spacing of
   the style guide (specification, section 6, "Stiliaus vadovas") is a
   custom property of the :root block below; the rules use the properties
   only - core/tests/test_style.py checks both.

   Layout breakpoints (NR-14 "Išdėstymas"): 768 px, 1024 px, 1280 px.
   Sizes of text are in rem, lines wrap: nothing needs sideways scrolling
   from 360 px up, also with 200 % text at 1280 px (NR-13).

   Contents:
     1. Properties          6. Messages and notices
     2. Base and text       7. Records, tables and lists of the areas
     3. Header and footer   8. Choices of the earlier booking flow
     4. Buttons and links   9. Booking flow: progress, back, selection bar,
     5. Forms                  option cards, nearest time, calendar, times,
                               summary, result pages
                           10. Motion and forced colours
                           11. First page */

/* --- 1. Properties --------------------------------------------------------- */

:root {
  /* Colours of the style guide. */
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface-warm: #F4EFE7;
  --border: #E4DED4;
  --border-strong: #8F877D;
  --text: #1F2328;
  --muted: #5A5550;
  --primary: #1E5B57;
  --primary-hover: #164542;
  --primary-tint: #E7F1EF;
  --primary-tint-hover: #D3E7E3;
  --accent: #B8892E;
  --accent-tint: #FBF5E9;
  --busy-bg: #EDEBE7;
  --busy-text: #6B665F;
  --faded: #8A847C;
  --error: #A4271E;
  --error-bg: #FBEAE8;
  --focus: #B35C00;

  /* K1 colours of the style guide: ink for headings and dark parts, sand
     for alternating sections, dark brass for labels (it may carry text). */
  --ink: #1A1714;
  --sand: #EFE7DA;
  --brass-text: #7A5A1E;

  /* Fonts of the style guide: the headings and the salon's name in
     Cormorant Garamond, served by the site (the @font-face rules below,
     NR-14 (d), S-110), with the guide's fallback serif fonts while it
     loads or if it cannot be loaded; the text in the system fonts. */
  --font-heading: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Shapes and spacing of the style guide (K1): one radius for buttons,
     cards and fields (P-78). */
  --radius: 2px;
  --gap-cards: 12px;
  --focus-width: 3px;
  --target: 44px;
  --button-height: 52px;
  --header-height: 64px;
  --shadow: 0 1px 2px rgba(31, 35, 40, 0.05), 0 4px 14px rgba(31, 35, 40, 0.05);
  --shadow-hover: 0 2px 4px rgba(31, 35, 40, 0.06), 0 10px 24px rgba(31, 35, 40, 0.08);
  --gutter: 16px;
  --content-width: 72rem;

  /* The first page (K1, section 11): the space between its blocks, the
     sticky bar of phones (at least 56 px - PK-26.13) and the easing of its
     animations. */
  --section-space: clamp(4.5rem, 3rem + 6vw, 9rem);
  --sticky-height: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 24px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 32px; }
}

/* The heading font (NR-14 (d), S-110): Cormorant Garamond of weight 500,
   normal and italic, as WOFF2 files of this site only - built by
   tools/build_fonts.py, licence in fonts/OFL.txt. "swap": until a file has
   loaded, and if it does not load, the text is shown in the fallback
   fonts of --font-heading. core/base.html preloads the normal file. */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/cormorant-garamond-500.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/cormorant-garamond-500-italic.woff2") format("woff2");
}

/* --- 2. Base and text ------------------------------------------------------ */

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

html {
  /* Keep the text size chosen by the browser on small screens. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* A long word (an e-mail address, a link) wraps instead of widening the page. */
  overflow-wrap: anywhere;
}

.container {
  width: 100%;
  max-width: calc(var(--content-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.main {
  flex: 1 0 auto;
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
}

/* Headings (K1): the heading font, weight 500 (the only weight of the
   font - S-110), ink. Every rule with the heading font has
   "font-synthesis: none": the browser never fakes a bold or a slanted
   face of it. The large heading of the landing page is U-45. */
h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-weight: 500;
  line-height: 1.2;
  margin: 1.5rem 0 0.75rem;
}

h1 {
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-top: 0.5rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

@media (min-width: 1024px) {
  h1 { font-size: 2.75rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.375rem; }
}

/* Label above a heading (K1 "eyebrow"): the text font in capitals, dark
   brass, never smaller than 14 px. */
.eyebrow {
  display: block;
  margin: 0 0 0.5rem;
  color: var(--brass-text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

a {
  color: var(--primary);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--primary-hover);
  text-decoration-thickness: 2px;
}

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

[hidden] {
  display: none !important;
}

/* Focus (NR-13 2.4.7, 1.4.11): a 3 px outline of the focus colour on every
   control and on headings and messages focused by the page (S-94). */
:focus-visible,
[tabindex="-1"]:focus {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: 2px;
}

h1:focus-visible,
h2:focus-visible,
h3:focus-visible,
p:focus-visible,
div:focus-visible,
h1[tabindex="-1"]:focus,
h2[tabindex="-1"]:focus,
p[tabindex="-1"]:focus,
div[tabindex="-1"]:focus {
  outline-offset: 4px;
  border-radius: var(--radius);
}

/* Icons: SVG fragments of core/templates/core/icons/, sized by the text. */
.icon {
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -0.125em;
}

/* Text for screen readers only (NR-13, S-95). */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--muted);
}

/* --- 3. Header and footer -------------------------------------------------- */

/* "Testinė sistema – registracijos netikros" (R-27, style guide row
   "Testinės sistemos juosta"): only when TEST_SYSTEM=1. A strip of its own
   above the header, the full width of the window, not part of the header
   (which stays 64 px); it scrolls with the page, has no links and no
   animation. One line of 20 px and 6 px above and below - 32 px; a longer
   line (200 % text) wraps and the strip grows. */
.test-system-banner {
  flex: none;
  margin: 0;
  padding: 0.375rem var(--gutter);
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  letter-spacing: normal;
  text-transform: none;
  text-align: center;
}

/* The header (K1, NR-14 (b)): the same on every page - 64 px high on the
   page background with a line under it; the salon's name on the left, the
   block "nav" of the page on the right. */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  /* One line at every width: the name and at most a small button. The
     links of a signed-in account are a strip under the header (S-118). */
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  /* 64 px together with the line under it; no padding, so that a name
     wrapped to two lines still fits (S-118). */
  min-height: calc(var(--header-height) - 1px);
  padding-top: 0;
  padding-bottom: 0;
}

/* The salon's name, as text in the heading font: there is no logo (NR-14). */
.site-name {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  color: var(--ink);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.04em;
  /* Lining figures of the heading font, as in K1 (e.g. a house number). */
  font-variant-numeric: lining-nums;
  text-decoration: none;
  /* A long name wraps inside the header instead of pushing the button out. */
  min-width: 0;
}

.site-name:hover {
  color: var(--ink);
}

/* "Atsijungti" of a signed-in account: the small button on the right of
   the header (S-118). */
.site-signout {
  flex: none;
  margin: 0 0 0 auto;
}

.site-signout form {
  margin: 0;
}

/* Links of a signed-in account (its area, "Mano profilis", "Keisti
   slaptažodį"): a strip right under the header, always shown, wrapping on
   narrow screens - not part of the 64 px header (NR-14 (b), (e); S-118). */
.site-nav {
  background: var(--surface-warm);
  border-bottom: 1px solid var(--border);
}

.site-nav .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.5rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  min-width: var(--target);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration-color: var(--accent);
}

.site-nav a:hover {
  color: var(--ink);
}

/* The footer (K1, NR-14 (c), P-59): the warm surface. */
.site-footer {
  background: var(--surface-warm);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer .container {
  display: grid;
  gap: 0.75rem;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.site-footer p,
.site-footer ul {
  margin: 0;
}

.site-footer__name {
  color: var(--ink);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: lining-nums;
}

.site-footer__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  padding: 0;
  list-style: none;
}

.site-footer__list li {
  display: flex;
  align-items: center;
  min-height: var(--target);
}

.site-footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  color: var(--text);
}

@media (min-width: 768px) {
  .site-footer .container {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1.5rem;
  }

  .site-footer__list {
    justify-content: flex-end;
  }
}

/* --- 4. Buttons and links -------------------------------------------------- */

/* Main button: a <button> without a class of its own, a submit input,
   .button and .btn--primary. */
button,
input[type="submit"] {
  font: inherit;
  cursor: pointer;
}

button:not([class]),
input[type="submit"],
.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--button-height);
  min-width: var(--target);
  padding: 0.5rem 2rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--surface);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.03em;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

button:not([class]):hover,
input[type="submit"]:hover,
.button:hover,
.btn--primary:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  color: var(--surface);
}

/* Pressed: the ink of the guide (U-37 P-2 - no colour outside the guide). */
button:not([class]):active,
input[type="submit"]:active,
.button:active,
.btn--primary:active {
  border-color: var(--ink);
  background: var(--ink);
}

.btn--block {
  width: 100%;
}

/* Secondary button: white with a strong edge. */
.button-secondary,
.btn--secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover,
.btn--secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-warm);
  color: var(--text);
}

/* Dangerous action as an outline ("Ištrinti registraciją"). */
.btn--danger-outline {
  border-color: var(--error);
  background: var(--surface);
  color: var(--error);
}

.btn--danger-outline:hover {
  border-color: var(--error);
  background: var(--error-bg);
  color: var(--error);
}

/* Dangerous action ("Ištrinti" of the deletion question): white on the
   error colour (about 7.3:1); on hover - the outline look. */
.btn--danger {
  border-color: var(--error);
  background: var(--error);
  color: var(--surface);
}

.btn--danger:hover {
  border-color: var(--error);
  background: var(--surface);
  color: var(--error);
}

/* Small button (K1): in the header and in the sticky bar, 44-48 px high;
   the same look as the main button otherwise. */
button.button--small,
.button--small,
.btn--small {
  min-height: var(--target);
  padding: 0.25rem 1.125rem;
  font-size: 0.9375rem;
}

/* "Atsijungti" in the header: a small secondary button. */
.button-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--target);
  padding: 0.25rem 1.125rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.03em;
}

.button-header:hover {
  background: var(--surface-warm);
}

/* "Pradžios puslapis" of the error pages, of the 403 page and of the Caddy
   page (NR-02 (a)-(d)): like every link of a public page, a target of at
   least 44 x 44 px (architecture 5.9, NR-13; U-37 P-1). */
.home-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  min-width: var(--target);
}

/* The buttons of a question ("Ištrinti", "Atšaukti"), side by side while
   they fit, one under the other in a narrow window. */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1.25rem 0;
}

/* --- 5. Forms -------------------------------------------------------------- */

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

label {
  display: block;
  font-weight: 600;
}

/* One labelled field of a form. */
.field {
  display: grid;
  gap: 0.375rem;
  min-width: 0;
  margin: 0 0 1.25rem;
}

.form {
  display: grid;
  gap: 1.25rem;
}

.form .field {
  margin: 0;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea,
.field__input {
  display: block;
  width: 100%;
  max-width: 30rem;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 1rem;
  transition: border-color 0.15s ease;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
select:hover,
textarea:hover,
.field__input:hover {
  border-color: var(--text);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--primary);
}

/* A field with an error: a thicker edge of the error colour, the message
   under it (NR-13: marked invalid, message tied to the field). */
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"],
.has-error .field__input {
  border: 2px solid var(--error);
}

.field-error,
.field__error {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  margin: 0;
  color: var(--error);
  font-size: 0.9375rem;
  font-weight: 600;
}

.field-error .icon,
.field__error .icon {
  margin-top: 0.2em;
}

/* Short explanation under a field. */
.field-hint,
.field__hint {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* One weekday of a master's working hours: "Nedirba" and up to three
   intervals, the start and the end side by side while there is room. */
.weekday {
  min-width: 0;
  margin: 0 0 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.weekday legend {
  padding: 0 0.25rem;
  color: var(--ink);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: 1.125rem;
  font-weight: 500;
}

.interval {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin: 0.5rem 0;
}

.interval-time {
  flex: 1 1 10rem;
  min-width: 0;
}

/* A group of tick boxes (the masters of a service): one box per line, the
   whole label clickable and large enough for a finger. */
.checkbox-group {
  min-width: 0;
  padding: 0;
  border: 0;
}

.checkbox-group legend {
  margin-bottom: 0.25rem;
  padding: 0;
  font-weight: 600;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: var(--target);
  margin: 0;
  font-weight: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.checkbox input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--primary);
}

/* --- 6. Messages and notices ----------------------------------------------- */

/* Information: white with an accent edge. */
.message,
.notice {
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.notice > .icon {
  width: 1.375rem;
  height: 1.375rem;
  color: var(--accent);
}

.notice__title {
  font-weight: 600;
}

/* Error: error colour on its own background (contrast about 7:1). */
.message-error,
.alert {
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--error);
  border-left: 4px solid var(--error);
  border-radius: var(--radius);
  background: var(--error-bg);
  color: var(--error);
  font-weight: 600;
  scroll-margin-top: 1rem;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert > .icon {
  width: 1.375rem;
  height: 1.375rem;
  margin-top: 1px;
}

/* A short note on the accent background (e.g. the note about today). */
.note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius);
  background: var(--accent-tint);
  color: var(--text);
  font-size: 0.9375rem;
}

.note > .icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent);
}

/* A finished action ("Registracija ištrinta"). */
.status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  background: var(--primary-tint);
  color: var(--primary);
  font-weight: 700;
}

.status .icon {
  width: 1.375rem;
  height: 1.375rem;
}

/* --- 7. Records, tables and lists of the areas ----------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Details of one record: a name and its value, one under the other; side
   by side from 768 px. */
.details {
  margin: 0 0 1.25rem;
  padding: 0.25rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.details dt {
  padding-top: 0.625rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.details dd {
  margin: 0;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.details dd:last-child {
  border-bottom: 0;
}

@media (min-width: 768px) {
  .details {
    display: grid;
    grid-template-columns: minmax(8rem, 35%) minmax(0, 1fr);
  }

  .details dt,
  .details dd {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .details dt:nth-last-of-type(1),
  .details dd:last-child {
    border-bottom: 0;
  }
}

/* Lists of links (the site owner's start page). */
.link-list {
  padding: 0;
  list-style: none;
}

.link-list li {
  margin: 0 0 0.5rem;
}

.link-list a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  justify-content: center;
  min-width: var(--target);
  font-size: 1.125rem;
  font-weight: 600;
}

/* Records of the site owner's area (services, masters): one card per
   record, the name, its details and the action links each on a line of its
   own, so that nothing has to be scrolled sideways at 360 px. */
.record-list {
  display: grid;
  gap: var(--gap-cards);
  padding: 0;
  list-style: none;
}

.record-list li {
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.record-name,
.record-detail,
.record-actions {
  display: block;
}

.record-name {
  font-size: 1.0625rem;
  font-weight: 700;
}

.record-detail {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.record-actions a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  justify-content: center;
  min-width: var(--target);
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  background: var(--surface);
}

th,
td {
  padding: 0.625rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Booking lists of the areas: a table on wide windows. On narrow ones
   (down to 360 px) every booking is a card with each value on a line under
   its name, so nothing has to be scrolled sideways. */

/* The lists of one area: links side by side, the shown one marked. */
.list-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0 0 1rem;
}

.list-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  justify-content: center;
  min-width: var(--target);
  font-weight: 600;
}

.list-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.4em;
}

.booking-table {
  border: 1px solid var(--border);
}

.booking-table td {
  /* Names, services and e-mail addresses may be broken anywhere. In a table
     only "anywhere" also lets the column get narrower than the longest word
     ("break-word" does not), so that a long address or name never makes the
     table wider than the window. */
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.booking-table td[data-field="date"],
.booking-table td[data-field="phone"],
.booking-table td[data-field="created"] {
  /* Dates and phone numbers break only between their parts (a valid phone
     number has at most 12 characters without a space or a dash). */
  overflow-wrap: normal;
}

.booking-table th {
  /* A column is never narrower than its name. */
  overflow-wrap: normal;
  background: var(--surface-warm);
}

.booking-table td[data-field="time"] {
  white-space: nowrap;
}

.booking-table .cell-label {
  display: none;
}

/* A row's action link: big enough to be pressed with a finger. */
.booking-table td[data-field="actions"] a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  justify-content: center;
  min-width: var(--target);
  font-weight: 600;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  margin: 0 0 1rem;
}

.pager a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  justify-content: center;
  min-width: var(--target);
  font-weight: 600;
}

/* In the table the link's 44 px box starts at the top of its cell, so that
   its text is on the line of the row's other values. */
@media (min-width: 56.0625rem) {
  .booking-table td[data-field="actions"] {
    padding-top: 0;
    padding-bottom: 0;
  }
}

@media (max-width: 56rem) {
  .booking-table,
  .booking-table tbody,
  .booking-table tr,
  .booking-table td {
    display: block;
  }

  .booking-table {
    border: 0;
    background: transparent;
  }

  .booking-table thead {
    /* The column names are repeated beside each value instead. */
    display: none;
  }

  .booking-table tr {
    margin: 0 0 var(--gap-cards);
    padding: 0.625rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .booking-table td {
    padding: 0.2rem 0;
    border: 0;
  }

  .booking-table .cell-label {
    display: block;
    color: var(--muted);
    font-size: 0.875rem;
  }

  .booking-table .cell-empty {
    display: none;
  }
}

/* --- 8. Choices of the earlier booking flow ----------------------------------
   Used by the master's new booking form. Each choice is one large link or
   button, a card like the option cards of the public flow (K1: white, a
   thin edge, a soft shadow, 2 px corners, 12 px apart); the chosen one is
   marked by colour, a double edge and the word "Pasirinkta". */

.choice-list {
  padding: 0;
  list-style: none;
}

.choice-list li {
  margin: 0 0 var(--gap-cards);
}

.choice {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  min-height: var(--target);
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.choice:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  color: var(--text);
}

/* A choice that is a button of a form: after a time could not be booked,
   the day and the time are sent together with what was entered. It looks
   exactly like the link. */
.choice-button {
  width: 100%;
  font-weight: 400;
  text-align: left;
}

.choice-name {
  font-weight: 600;
}

.choice-detail {
  color: var(--muted);
}

.choice-selected,
.choice-selected:hover {
  border-color: var(--primary);
  background: var(--primary-tint);
  box-shadow: inset 0 0 0 1px var(--primary), var(--shadow);
}

.choice-mark {
  margin-left: auto;
  color: var(--primary);
  font-weight: 700;
}

/* A day that cannot be chosen: not a link, greyed, with the reason in words. */
.choice-disabled,
.choice-disabled:hover {
  border-color: var(--border);
  background: var(--busy-bg);
  box-shadow: none;
  color: var(--busy-text);
}

/* Days and times: the same choices laid out in as many equal columns as fit
   (one column of days and three of times at 360 px). */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: var(--gap-cards);
}

.choice-grid li {
  min-width: 0;
  margin: 0;
}

.choice-grid .choice {
  height: 100%;
}

.choice-grid-compact {
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
}

/* The chosen time takes two columns, so that "Pasirinkta" fits beside it. */
.choice-wide {
  grid-column: span 2;
}

/* --- 9. Booking flow (S-88, prototype A) ------------------------------------ */

/* Heading of a step ("Paslauga", "Meistras", ...). */
.step-title {
  margin: 0.5rem 0 1rem;
  font-size: 1.75rem;
}

@media (min-width: 1024px) {
  .step-title {
    margin: 1rem 0 1.25rem;
    font-size: 2.25rem;
  }
}

/* Progress: up to 1023 px a line "{n} žingsnis iš 4 · {name}" and a bar of
   four parts; from 1024 px a list of the four steps. Only one is shown, the
   other is display: none, so a screen reader meets only one (5.8). */
.progress {
  margin-bottom: 0.5rem;
}

.progress__text {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.progress__text strong {
  color: var(--text);
  font-weight: 600;
}

.progress__bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.progress__seg {
  height: 6px;
  border-radius: var(--radius);
  background: var(--border);
}

.progress__seg.is-filled {
  background: var(--primary);
}

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

@media (min-width: 1024px) {
  .progress {
    margin-bottom: 1rem;
  }

  .progress__text,
  .progress__bar {
    display: none;
  }

  .steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 4px 0;
  }

  .steps__item {
    position: relative;
  }

  .steps__item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 21px;
    left: 40px;
    right: 12px;
    height: 2px;
    background: var(--border);
  }

  .steps__item.is-done::after {
    background: var(--primary);
  }

  .steps__link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: var(--target);
    padding: 0 10px 0 0;
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--muted);
    text-decoration: none;
  }

  .steps__dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    background: var(--surface);
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
  }

  .steps__name {
    font-size: 0.9375rem;
  }

  .is-done .steps__link {
    color: var(--primary);
  }

  .is-done .steps__dot {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--surface);
  }

  .is-done .steps__dot .icon {
    width: 18px;
    height: 18px;
  }

  a.steps__link:hover {
    color: var(--primary-hover);
  }

  a.steps__link:hover .steps__name {
    text-decoration: underline;
  }

  .is-current .steps__link {
    color: var(--text);
  }

  .is-current .steps__dot {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-tint);
  }

  .is-current .steps__name {
    font-weight: 700;
  }
}

/* "Atgal". */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--target);
  margin: 4px 0 4px -6px;
  padding: 0 10px 0 6px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

.back .icon {
  width: 18px;
  height: 18px;
}

.back:hover {
  background: var(--primary-tint);
}

.back:hover span {
  text-decoration: underline;
}

/* Selection bar of steps 2 and 3: "Kirpimas · 60 min · 25,00 € · Cecilija"
   and "Keisti". */
.selection {
  margin: 8px 0 4px;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface-warm);
}

.selection__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0 12px;
}

.selection__text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 6px 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.selection__change,
.summary__change {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--target);
  min-width: var(--target);
  flex: none;
  padding: 0 12px;
  border-radius: var(--radius);
  font-weight: 600;
  white-space: nowrap;
}

.selection__change:hover,
.summary__change:hover {
  background: var(--primary-tint);
}

.selection__note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 0 8px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.selection__note .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* Option cards: services (step 1) and masters (step 2). */
.options {
  display: grid;
  gap: var(--gap-cards);
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 76px;
  padding: 16px 16px 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.option--master {
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  padding-left: 16px;
}

.option:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  color: var(--text);
  transform: translateY(-1px);
}

.option:active {
  transform: translateY(0);
}

.option.is-selected,
.option[aria-current="true"] {
  border-color: var(--primary);
  background: var(--primary-tint);
  box-shadow: inset 0 0 0 1px var(--primary), var(--shadow);
}

.option__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.option__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

.option__meta {
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.option__price {
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.option__chevron {
  display: flex;
  color: var(--muted);
}

.option__chevron .icon {
  width: 20px;
  height: 20px;
}

.option:hover .option__chevron {
  color: var(--primary);
}

/* The master's initial in a circle. */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--text);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: 1.25rem;
  font-weight: 500;
}

/* "Pasirinkta" on a chosen card. */
.badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--surface);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Nearest free time: a card with an accent outline. */
.nearest {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: left;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.nearest > .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.nearest > span:not(.nearest__chevron) {
  flex: 1;
}

.nearest__chevron {
  display: flex;
  color: var(--muted);
}

.nearest__chevron .icon {
  width: 20px;
  height: 20px;
}

.nearest:hover {
  background: var(--accent-tint);
  color: var(--text);
}

.nearest--inline {
  margin: 0;
  box-shadow: none;
}

/* The nearest free time of the page that keeps the client's details: a
   form of its own around the button. */
.nearest-form {
  margin: 0;
}

.nearest-form--inline {
  margin-top: 0.75rem;
}

.notice > div > a.nearest--inline {
  margin-top: 0.75rem;
}

@media (min-width: 768px) {
  .nearest {
    width: fit-content;
    min-width: 26rem;
    max-width: 100%;
  }

  .nearest--inline {
    min-width: 0;
  }
}

/* Step 3 layout: calendar on the left, times on the right from 1024 px. */
.date-time {
  display: grid;
  gap: 28px;
}

@media (min-width: 1024px) {
  .date-time {
    grid-template-columns: 25rem minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }
}

/* Calendar: a table of the month (S-93). The month buttons lie over the
   caption row of the table, on its left and right. */
.calendar {
  position: relative;
  padding: 12px 8px 16px;
}

@media (max-width: 479px) {
  /* Full-bleed panel keeps 7 day cells at 44 px or more on 360 px screens.
     Its corners keep the 2 px radius of every card (NR-14 (1), P-78). */
  .calendar {
    margin-inline: calc(-1 * var(--gutter));
    border-inline: 0;
  }
}

@media (min-width: 480px) {
  .calendar {
    padding: 16px;
  }
}

.calendar__head {
  position: absolute;
  top: 12px;
  right: 10px;
  left: 10px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.calendar__head > * {
  pointer-events: auto;
}

@media (min-width: 480px) {
  .calendar__head {
    top: 16px;
    right: 16px;
    left: 16px;
  }
}

/* A month button of the page that keeps the client's details: a form of
   its own around the button. */
.calendar__form {
  display: inline-flex;
  margin: 0;
}

/* Month buttons ‹ ›; the inactive one is a <span aria-disabled="true">. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--target);
  height: var(--target);
  padding-bottom: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--primary);
  font-size: 1.625rem;
  line-height: 1;
  text-decoration: none;
}

a.icon-btn:hover,
button.icon-btn:hover {
  border-color: var(--primary);
  background: var(--primary-tint);
}

.icon-btn[aria-disabled="true"] {
  border-style: dashed;
  background: transparent;
  color: var(--faded);
}

.calendar__grid {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  background: transparent;
}

/* The month's heading "2026 m. gruodis" between the month buttons. */
.calendar__grid caption {
  min-height: var(--target);
  margin-bottom: 8px;
  padding-inline: calc(var(--target) + 8px);
  color: var(--ink);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: var(--target);
  text-align: center;
}

.calendar__grid th {
  padding: 6px 0 8px;
  border: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
}

.calendar__grid td {
  padding: 2px;
  border: 0;
  text-align: center;
}

/* One day: a link (FREE, FULL) or a <span> (the other states). */
.day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: var(--target);
  height: 52px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-decoration: none;
}

.day__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
}

.day__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 8px;
  margin-top: 4px;
}

.day__today {
  display: none;
}

/* Yra laisvų laikų: bold number with a dot. */
.day--free {
  background: var(--primary-tint);
}

.day--free .day__num {
  font-weight: 700;
}

.day--free .day__mark::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* Laisvų laikų nėra: struck number, no dot. */
.day--full {
  border-color: var(--border);
  background: var(--surface);
  color: var(--muted);
}

.day--full .day__num {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--muted);
}

/* Nedirba: number on diagonal hatching. */
.day--off {
  background: repeating-linear-gradient(135deg, var(--busy-bg) 0 2px, var(--surface-warm) 2px 7px);
  color: var(--busy-text);
}

/* Praėjusi diena, registracija dar negalima: faded number. */
.day--past,
.day--not-yet {
  color: var(--faded);
}

a.day:hover,
button.day:hover {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

/* Šiandien: a round ring; from 1024 px also the word "Šiandien". */
.day--today .day__num {
  box-shadow: 0 0 0 2px var(--accent);
}

/* Pasirinkta: filled with a tick. */
.day--selected {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--surface);
}

.day--selected .day__num {
  text-decoration-color: var(--surface);
}

.day--selected.day--today .day__num {
  box-shadow: 0 0 0 2px var(--surface);
}

.day--selected .day__mark::before {
  display: none;
}

.day--selected .day__mark .icon {
  width: 13px;
  height: 13px;
}

a.day--selected:hover,
button.day--selected:hover {
  background: var(--primary-hover);
  box-shadow: none;
}

@media (min-width: 1024px) {
  .day {
    height: 64px;
  }

  .day--today {
    justify-content: flex-start;
    padding-top: 7px;
  }

  .day__today {
    display: block;
    margin-bottom: 2px;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
  }

  .day--today .day__num {
    width: 28px;
    height: 28px;
  }
}

/* Legend under the calendar: five samples (PK-02.9). */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 14px 0 0;
  padding: 14px 6px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  list-style: none;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend__swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.legend__swatch.day--full {
  border-color: var(--border-strong);
}

.legend__swatch.day--off {
  border-color: var(--border-strong);
}

.legend__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.legend__strike {
  color: var(--muted);
  font-weight: 600;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.legend__swatch--today {
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.legend__swatch.day--selected {
  background: var(--primary);
  color: var(--surface);
}

.legend__swatch.day--selected .icon {
  width: 13px;
  height: 13px;
}

@media (min-width: 480px) {
  .legend {
    padding-inline: 0;
  }
}

/* Times of the chosen day, grouped "Rytas", "Diena", "Vakaras". */
.times__title {
  margin: 0 0 14px;
  font-size: 1.25rem;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  scroll-margin-top: 16px;
}

.slot-group {
  margin: 0;
}

.slot-group + .slot-group {
  margin-top: 20px;
}

.slot-group__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  color: var(--brass-text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.slot-group__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Times: 3 columns up to 767 px, 4 up to 1279 px, 5 from 1280 px (NR-14). */
.slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .slots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .slots {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  min-height: 52px;
  padding: 6px 4px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary-tint);
  color: var(--primary);
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-decoration: none;
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
}

a.slot:hover,
button.slot:hover {
  background: var(--primary-tint-hover);
  box-shadow: inset 0 0 0 1px var(--primary);
  color: var(--primary);
}

/* A taken time: a <span>, not a control; struck time and the word
   "užimta" (PK-03.1, PK-03.12). */
.slot--taken {
  border-color: var(--border);
  background: var(--busy-bg);
  color: var(--busy-text);
  font-weight: 500;
}

.slot--taken s {
  text-decoration-thickness: 1.5px;
}

.slot__word {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.slot--selected,
a.slot--selected:hover,
button.slot--selected:hover {
  flex-direction: row;
  gap: 6px;
  border-color: var(--primary);
  background: var(--primary);
  color: var(--surface);
  box-shadow: none;
}

a.slot--selected:hover,
button.slot--selected:hover {
  background: var(--primary-hover);
}

.slot--selected .icon {
  width: 16px;
  height: 16px;
}

/* Step 4 layout: up to 1023 px the summary comes before the form; from
   1024 px the form on the left, the summary on the right, sticky. */
.contact {
  display: grid;
  gap: 24px;
}

@media (min-width: 1024px) {
  .contact {
    grid-template-columns: minmax(0, 1fr) 24rem;
    gap: 40px;
    align-items: start;
  }

  .contact__summary {
    position: sticky;
    top: 24px;
    grid-column: 2;
    grid-row: 1;
  }

  .contact__form {
    grid-column: 1;
    grid-row: 1;
    max-width: 36rem;
  }
}

/* Summary "Jūsų registracija" with "Keisti". */
.summary {
  padding: 18px 16px 10px 20px;
}

.summary__title {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.summary__list {
  margin: 0;
}

.summary__row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  align-items: center;
  gap: 4px 12px;
  min-height: 48px;
  padding: 4px 0;
  border-top: 1px solid var(--border);
}

.summary__row:first-child {
  border-top: 0;
}

.summary__row dt {
  color: var(--muted);
  font-size: 0.9375rem;
}

.summary__row dd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.summary__value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.summary__change {
  margin-right: -6px;
}

.summary__list--plain .summary__row {
  grid-template-columns: minmax(7rem, 40%) minmax(0, 1fr);
}

/* The salon's phone number among the rows: a link to call, a target of at
   least 44 px (NR-13). */
a.summary__value {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: var(--target);
}

.form__privacy {
  display: flex;
  margin: 0;
}

.form__privacy a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
}

/* Confirmation and the booking's own page (PK-05.10, PK-20.9). */
.result {
  display: grid;
  gap: 18px;
  max-width: 40rem;
  margin: 8px auto 0;
  padding: 28px 20px 24px;
}

@media (min-width: 768px) {
  .result {
    padding: 36px 40px 32px;
  }
}

.result > * {
  margin: 0;
}

.result__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.result__icon--ok {
  background: var(--primary);
  color: var(--surface);
  box-shadow: 0 0 0 6px var(--primary-tint);
}

.result__icon .icon {
  width: 28px;
  height: 28px;
}

.result__title {
  font-size: 1.75rem;
  line-height: 1.2;
}

.result__email {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--primary-tint);
  overflow-wrap: anywhere;
}

.result__email .icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--primary);
}

.result__delete {
  display: grid;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.result__delete > * {
  margin: 0;
}

.result__delete .btn,
.result > .btn {
  justify-self: start;
}

/* The deletion question in place of the button (S-101). */
.confirm {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--error);
  border-radius: var(--radius);
  background: var(--error-bg);
}

.confirm > * {
  margin: 0;
}

.confirm__question {
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 700;
}

.confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.confirm__actions .btn {
  flex: 1 1 10rem;
}

@media (max-width: 479px) {
  .result__delete .btn,
  .result > .btn {
    width: 100%;
  }
}

/* --- 10. Motion and forced colours ----------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .option:hover {
    transform: none;
  }
}

@media (forced-colors: active) {
  .day--selected,
  .slot--selected {
    outline: 2px solid CanvasText;
  }

  .day--free .day__mark::before,
  .legend__dot {
    background: CanvasText;
  }
}

/* --- 11. First page (R-26; S-109, S-113; architecture 5.10) ---------------- */

/* The components of K1 "Ateljė" from prototipai/pradzia-1/styles.css
   without its prototype bar and panel, in the values of the style guide:
   the 64 px header of every page (not the prototype's 76 px), the site's
   gutters and 72 rem content width, guide colours only (the lines and the
   image placeholders on sand are guide colours instead of the prototype's
   translucent ink). Nothing here needs a script: the sticky bar is
   "position: sticky" (S-113), and every animation is in the
   "prefers-reduced-motion: no-preference" block at the end (PK-26.15). */

/* "Pereiti prie turinio": out of sight until it has the focus (NR-13). */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0 1.125rem;
  background: var(--ink);
  color: var(--surface);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.skip-link:hover {
  color: var(--surface);
}

/* The links of the header from 1024 px; up to 1023 px there are none
   (PK-26.1). They sit next to "Registruotis" on the right. */
.landing-nav {
  display: none;
}

.landing-header__cta {
  flex: none;
}

/* "Skambinti: {phone}" (PK-26.12) does not fit next to the name on narrow
   screens; the same button is on the first screen and in the sticky bar. */
@media (max-width: 479px) {
  .landing-header__cta--call {
    display: none;
  }
}

@media (min-width: 1024px) {
  .landing-nav {
    display: block;
    margin-left: auto;
  }

  .landing-nav ul {
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .landing-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: var(--target);
    min-width: var(--target);
    padding: 0 0.875rem;
    color: var(--text);
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    text-decoration: none;
  }

  .landing-nav a::after {
    content: "";
    position: absolute;
    right: 0.875rem;
    bottom: 9px;
    left: 0.875rem;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
  }

  .landing-nav a:hover {
    color: var(--ink);
  }

  .landing-nav a:hover::after {
    transform: scaleX(1);
  }
}

/* The page's main content: the blocks fill the width, each with its own
   container. */
.landing {
  flex: 1 0 auto;
}

/* The target of "Pereiti prie turinio" is not a control. */
.landing[tabindex="-1"]:focus {
  outline: none;
}

.landing :where(h1, h2, h3, p, ul, ol, figure, blockquote, address) {
  margin: 0;
}

.landing :where(ul, ol) {
  padding: 0;
  list-style: none;
}

.landing address {
  font-style: normal;
}

.landing img {
  display: block;
}

/* <picture> of {% picture %}: the <img> is laid out as if it were the
   child of the image container. */
.landing picture {
  display: contents;
}

/* Cormorant has old-style figures by default; addresses, prices and the
   salon's name use lining figures, as in the prototype. */
.hero__title,
.section-title,
.menu__name,
.menu__price,
.master__name,
.contacts__address,
.menu-empty__title {
  font-variant-numeric: lining-nums;
}

/* "Paslaugos ir kainos", "Atidaryti žemėlapyje": a link with an arrow. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--target);
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.35em;
}

.link-arrow:hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

.link-arrow__icon {
  flex: none;
  width: 24px;
  height: 12px;
  color: var(--brass-text);
}

/* The heading of a block, with a short brass line above it. */
.section-title {
  color: var(--ink);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.section-title::before {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin-bottom: 1.5rem;
  background: var(--accent);
}

/* An image container: its proportions and a placeholder tone keep the
   layout when a file or a master's photo is missing (architecture 5.10). */
.media {
  position: relative;
  overflow: hidden;
  background: var(--border);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* First screen (PK-26.2): up to 767 px the image above the heading, at
   most 38 % of the screen height; from 1024 px the text on the left and
   the image on the right. */
.hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 2.5rem;
}

.hero__media {
  order: -1;
}

.hero__frame {
  position: relative;
  margin-right: 10px;
}

.hero__frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 38svh;
  aspect-ratio: 4 / 5;
  background: var(--border);
  object-fit: cover;
  object-position: 42% 38%;
}

/* The decorative brass frame, offset down and to the right. */
.hero__frame::after {
  content: "";
  position: absolute;
  inset: 10px -10px -10px 10px;
  border: 1px solid var(--accent);
  pointer-events: none;
}

.hero__text {
  display: flex;
  flex-direction: column;
}

/* The one main heading of the first page (style guide). */
.hero__title {
  margin-top: 0.875rem;
  color: var(--ink);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: clamp(2.5rem, 4.5vw + 1rem, 5.25rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.hero__title em {
  font-style: italic;
  font-weight: 500;
}

.hero__lead {
  max-width: 34rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.75rem;
  margin-top: 1.5rem;
}

.hero__actions .btn--hero {
  width: 100%;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.hero__meta::before {
  content: "";
  flex: none;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

@media (max-width: 767px) {
  /* The first screen fills the screen, so that the sticky bar appears only
     once it is scrolled away (S-113). */
  .hero {
    min-height: calc(100svh - var(--header-height));
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .hero__actions .btn--hero {
    width: auto;
  }
}

@media (min-width: 768px) {
  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2.5rem;
    padding-top: 2.5rem;
    padding-bottom: 4.5rem;
  }

  .hero__media {
    order: 0;
  }

  .hero__frame {
    margin-right: 16px;
  }

  .hero__frame img {
    height: min(78svh, 760px);
    max-height: none;
    aspect-ratio: auto;
  }

  .hero__frame::after {
    inset: 16px -16px -16px 16px;
  }

  .hero__actions .btn--hero {
    width: auto;
  }
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.5rem;
    padding-top: 2rem;
    padding-bottom: 6rem;
  }

  .hero__text {
    grid-column: 1 / 7;
    padding-right: clamp(0px, 3vw, 48px);
    padding-bottom: 0.5rem;
  }

  .hero__media {
    grid-column: 7 / 13;
  }

  .hero__frame img {
    height: min(88svh, 860px);
    max-height: calc(100svh - 120px);
    min-height: 520px;
  }

  .hero__lead {
    margin-top: 1.5rem;
    font-size: 1.1875rem;
  }

  .hero__actions {
    margin-top: 2.25rem;
  }

  .hero__meta {
    margin-top: 3rem;
  }
}

/* The sticky bar of phones (PK-26.13; S-113): the last child of the blocks
   after the first screen, so it sticks to the bottom of the screen only
   while they are on it and is gone before the footer. At least 56 px, its
   button 48 px; none from 768 px. */
.sticky-cta {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  min-height: var(--sticky-height);
  padding: 0.75rem var(--gutter);
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.sticky-cta .btn {
  min-height: 48px;
}

/* A focused element is never hidden under the bar (NR-13 2.4.11). */
@media (max-width: 767px) {
  html:has(.sticky-cta) {
    scroll-padding-bottom: calc(var(--sticky-height) + 12px);
  }
}

@media (min-width: 768px) {
  .sticky-cta {
    display: none;
  }
}

/* Principles (PK-26.3). */
.principles {
  padding-top: 0.5rem;
  padding-bottom: var(--section-space);
}

.principles__list {
  border-top: 1px solid var(--border);
}

.principle {
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: 0.75rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.principle__num {
  grid-row: 1 / 3;
  padding-top: 0.5rem;
  color: var(--brass-text);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.16em;
}

.principle__title {
  color: var(--ink);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.15;
}

.principle__text {
  max-width: 26rem;
  margin-top: 0.375rem;
  color: var(--muted);
}

@media (min-width: 768px) {
  .principles__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--border);
  }

  .principle {
    display: block;
    padding: 2.25rem 2rem 2.5rem;
    border-bottom: 0;
    border-left: 1px solid var(--border);
  }

  .principle:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .principle__num {
    display: block;
    margin-bottom: 1.25rem;
    padding-top: 0;
  }

  .principle__title {
    font-size: clamp(1.75rem, 1rem + 1.2vw, 2.25rem);
  }

  .principle__text {
    margin-top: 0.625rem;
  }
}

/* "Paslaugos ir kainos" (PK-26.4, PK-26.5): a menu - every row is a link
   to step 2 with the service; the price after a dotted leader, only when
   it is set. The photo beside the list from 1024 px. */
.services {
  padding-block: var(--section-space);
  background: var(--sand);
}

.services__grid {
  display: grid;
  gap: 3rem;
}

.menu {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border-strong);
}

.menu__item {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(1.5rem, 1fr) auto;
  align-items: baseline;
  column-gap: 0.75rem;
  padding: 1.25rem 0 1.125rem;
  border-bottom: 1px solid var(--border-strong);
  color: var(--ink);
  text-decoration: none;
}

.menu__item:hover {
  color: var(--ink);
}

.menu__name {
  position: relative;
  grid-column: 1;
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* The brass line under the service's name, drawn on hover and focus. */
.menu__name::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.menu__item:hover .menu__name::after,
.menu__item:focus-visible .menu__name::after {
  transform: scaleX(1);
}

.menu__leader {
  grid-column: 2;
  align-self: end;
  margin-bottom: 0.45em;
  border-bottom: 1px dotted var(--accent);
}

.menu__price {
  grid-column: 3;
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  font-variant-numeric: lining-nums tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.menu__duration {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.services__cta {
  margin-top: 2.5rem;
}

/* No public service (PK-26.12). */
.menu-empty {
  margin-top: 2.5rem;
  padding: 1.75rem 0 1.875rem;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

.menu-empty__title {
  color: var(--ink);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
}

.menu-empty__text {
  margin-top: 0.5rem;
  color: var(--muted);
}

.menu-empty__text a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  color: var(--primary);
  font-weight: 600;
}

.services__media {
  display: none;
  aspect-ratio: 4 / 5;
}

.media--v03-zirkles-sukos img {
  object-position: 38% 50%;
}

@media (max-width: 767px) {
  .services__cta .btn {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .menu__name,
  .menu__price {
    font-size: 1.75rem;
  }

  .menu__item {
    padding: 1.5rem 0 1.375rem;
  }
}

@media (min-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.5rem;
    align-items: start;
  }

  .services__main {
    grid-column: 1 / 8;
  }

  .services__media {
    display: block;
    grid-column: 9 / 13;
    margin-top: 84px;
  }
}

/* "Meistrai" (PK-26.7, PK-26.8): photo and name, the nearest free time
   when one service is shown. A master without a photo keeps the same
   card, with the initial in place of the photo. */
.masters {
  padding-block: var(--section-space);
}

.masters__list {
  display: grid;
  gap: 2rem;
  margin-top: 2.5rem;
}

.master {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  align-items: end;
  gap: 1.125rem;
}

.master__media {
  aspect-ratio: 4 / 5;
  background: var(--sand);
}

.master__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.master__initial {
  color: var(--brass-text);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: clamp(3rem, 2rem + 4vw, 5rem);
  font-weight: 500;
  line-height: 1;
}

.media--v10-meistras-1 img {
  object-position: 52% 18%;
}

.media--v11-meistras-2 img {
  object-position: 50% 32%;
}

.media--v12-meistras-3 img {
  object-position: 62% 22%;
}

.master__name {
  color: var(--ink);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.1;
}

.master__next {
  margin-top: 0.625rem;
}

.master__next a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding-block: 0.25rem;
  color: var(--brass-text);
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: currentColor;
}

.master__next a:hover {
  color: var(--ink);
}

@media (min-width: 768px) {
  .masters__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 3.5rem;
  }

  .master {
    display: block;
  }

  .master__body {
    padding-top: 1.375rem;
  }

  .master__name {
    font-size: 2rem;
  }

  .master__next {
    margin-top: 0.5rem;
  }
}

@media (min-width: 1024px) {
  .masters__list {
    column-gap: 2.5rem;
  }

  /* A gentle editorial stagger. */
  .master:nth-child(3n + 2) {
    margin-top: 64px;
  }
}

/* "Apie" (PK-26.9): the photo with a sand plate over its edge. */
.about {
  padding-bottom: var(--section-space);
}

.about__media {
  aspect-ratio: 4 / 5;
}

.media--v07-kede-veidrodis img {
  object-position: 30% 70%;
}

.about__plate {
  position: relative;
  z-index: 1;
  margin: -64px 1rem 0;
  padding: 2.25rem 1.75rem 2.5rem;
  background: var(--sand);
}

.about__title {
  font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem);
}

.about__text {
  max-width: 30rem;
  margin-top: 1.25rem;
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
}

@media (min-width: 768px) {
  .about__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
    column-gap: 1.5rem;
  }

  .about__media {
    grid-column: 1 / 9;
    grid-row: 1;
    aspect-ratio: 5 / 4;
  }

  .media--v07-kede-veidrodis img {
    object-position: 30% 62%;
  }

  .about__plate {
    grid-column: 8 / 13;
    grid-row: 1;
    margin: 0;
    padding: 3rem 2.5rem 3.25rem;
  }
}

@media (min-width: 1024px) {
  .about__media {
    grid-column: 1 / 8;
  }

  .about__plate {
    grid-column: 7 / 13;
    padding: 4rem 3.5rem 4.5rem;
    transform: translateY(64px);
  }
}

/* "Mūsų darbai" (PK-26.9): three photos, no viewer. */
.works {
  padding-block: var(--section-space);
}

.works__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-cards);
  margin-top: 2.5rem;
}

.works__item {
  aspect-ratio: 1 / 1;
}

.works__item.works__item--large {
  grid-column: 1 / -1;
  aspect-ratio: 4 / 5;
}

.media--v08-rezultatas-profilis img {
  object-position: 45% 35%;
}

.media--v09-rezultatas-pakausis img {
  object-position: 45% 30%;
}

.media--v05-rankos-kirpimas img {
  object-position: 42% 55%;
}

@media (min-width: 768px) {
  .works__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3.5rem;
  }

  .works__item {
    grid-column: 8 / 13;
    min-height: 0;
    aspect-ratio: auto;
  }

  .works__item.works__item--large {
    grid-column: 1 / 8;
    grid-row: 1 / 3;
    aspect-ratio: 5 / 6;
  }

  /* The large photo sets the height; the two small ones fill their rows. */
  .works__item img {
    position: absolute;
    inset: 0;
  }
}

/* The testimonial (PK-26.9) with "Pavyzdinis atsiliepimas" under the
   author. */
.quote {
  padding-bottom: var(--section-space);
}

.quote__figure {
  max-width: 52rem;
  margin-inline: auto;
  text-align: center;
}

.quote__ornament {
  display: block;
  width: 1px;
  height: 56px;
  margin: 0 auto 2rem;
  background: var(--accent);
}

.quote__text p {
  color: var(--ink);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3.375rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.18;
  text-wrap: balance;
}

.quote__caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1.75rem;
}

.quote__author {
  color: var(--brass-text);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.quote__note {
  color: var(--muted);
  font-size: 0.875rem;
}

/* "Kontaktai ir darbo laikas" (PK-26.10, PK-26.11). */
.contacts {
  padding-block: var(--section-space);
  background: var(--sand);
}

.contacts__grid {
  display: grid;
  gap: 3rem;
}

.contacts__address {
  margin-top: 2rem;
  color: var(--ink);
  font-family: var(--font-heading);
  font-synthesis: none;
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.25;
}

.contacts__phone {
  margin-top: 0.25rem;
}

.contacts__phone a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  color: var(--primary);
  font-weight: 600;
}

/* On the sand of the block, not on the white of the area tables. */
.hours {
  width: 100%;
  max-width: 28rem;
  margin: 1.75rem 0 0;
  border-collapse: collapse;
  background: transparent;
  font-variant-numeric: tabular-nums;
}

.hours th,
.hours td {
  padding: 0.625rem 0;
  border-top: 1px solid var(--border-strong);
  border-bottom: 0;
  font-size: 0.9375rem;
  text-align: left;
}

.hours tr:last-child th,
.hours tr:last-child td {
  border-bottom: 1px solid var(--border-strong);
}

.hours th {
  color: var(--muted);
  font-weight: 400;
}

.hours td {
  color: var(--ink);
  text-align: right;
}

.contacts__cta {
  margin-top: 2.25rem;
}

.contacts__visuals {
  display: grid;
  gap: 1.5rem;
}

.contacts__photo {
  aspect-ratio: 3 / 2;
}

.media--v13-iejimas img {
  object-position: 40% 55%;
}

/* The schematic map (S-114) and "Atidaryti žemėlapyje". */
.map {
  border: 1px solid var(--border-strong);
  background: var(--bg);
}

.map__img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  background: var(--sand);
}

.map__caption {
  padding: 0.375rem 1rem;
  border-top: 1px solid var(--border-strong);
}

@media (max-width: 767px) {
  .contacts__cta .btn {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .contacts__visuals {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .contacts__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.5rem;
  }

  .contacts__info {
    grid-column: 1 / 6;
  }

  .contacts__visuals {
    grid-column: 7 / 13;
    grid-template-columns: 1fr;
    padding-top: 72px;
  }

  .contacts__photo {
    aspect-ratio: 16 / 9;
  }

  .map__img {
    aspect-ratio: 2 / 1;
    object-fit: cover;
  }
}

/* Motion of the first page (PK-26.15; S-113): only when no reduced motion
   is asked for. The state without these rules is the final one, so a
   browser without animations and reduced motion show everything at once;
   nothing loops. */
@media (prefers-reduced-motion: no-preference) {
  html:has(.landing) {
    scroll-behavior: smooth;
  }

  .hero__frame img {
    animation: landing-reveal 900ms var(--ease-out) both;
  }

  .hero__frame::after {
    transform-origin: 0 0;
    animation: landing-frame 700ms var(--ease-out) 450ms both;
  }

  .hero__eyebrow {
    animation: landing-rise 600ms var(--ease-out) 50ms both;
  }

  .hero__title {
    animation: landing-rise 600ms var(--ease-out) 150ms both;
  }

  .hero__lead {
    animation: landing-rise 600ms var(--ease-out) 250ms both;
  }

  .hero__actions {
    animation: landing-rise 600ms var(--ease-out) 350ms both;
  }

  .hero__meta {
    animation: landing-rise 600ms var(--ease-out) 450ms both;
  }

  .landing-nav a::after,
  .menu__name::after {
    transition: transform 200ms var(--ease-out);
  }

  .link-arrow__icon {
    transition: transform 200ms var(--ease-out);
  }

  .link-arrow:hover .link-arrow__icon {
    transform: translateX(4px);
  }

  .master__media img {
    transition: transform 700ms var(--ease-out);
  }

  .master:hover .master__media img {
    transform: scale(1.03);
  }

  /* The photos after the first screen come into full colour while they
     are scrolled into view - only where the browser can tie an animation
     to scrolling. */
  @supports (animation-timeline: view()) {
    .after-hero .media img {
      animation: landing-soft-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 80%;
    }
  }

  @keyframes landing-reveal {
    from {
      clip-path: inset(100% 0 0 0);
      transform: scale(1.06);
    }

    to {
      clip-path: inset(0 0 0 0);
      transform: scale(1);
    }
  }

  @keyframes landing-frame {
    from {
      opacity: 0;
      transform: scale(0.94);
    }

    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  @keyframes landing-rise {
    from {
      opacity: 0;
      transform: translateY(12px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes landing-soft-in {
    from {
      opacity: 0.25;
      transform: scale(1.04);
    }

    to {
      opacity: 1;
      transform: scale(1);
    }
  }
}
