/* Hygge (rossimax.it/shopify-theme/hygge/): the project's own look, in place of the Rossimax site.css.
   Colors follow the Hygge preset; dark when the visitor's device asks for it. */
:root {
  --bg: #f5eee1; --surface: #fffaf2; --text: #2f2a24; --muted: #6b6157; --accent: #9a4a2e; --line: #e2d7c4;
  --ok: #3f6b3a; --error: #a3321c;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1d1a17; --surface: #262220; --text: #f0e5d1; --muted: #b9ab96; --accent: #e0a76a; --line: #3a342e; --ok: #9fcf8f; --error: #f0a08a; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hy-wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
h1 { font: 600 2.4rem/1.15 Georgia, "Times New Roman", serif; margin: 0 0 8px; }
h2 { font: 600 1.6rem/1.25 Georgia, "Times New Roman", serif; margin: 56px 0 12px; padding-top: 8px; }
h3 { font-size: 1.1rem; margin: 28px 0 8px; }
p, li { max-width: 70ch; }
code { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-size: 0.9em; }
.bc-skip { position: absolute; left: -10000px; }
.bc-skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; border-radius: 6px; z-index: 10; }

/* Bar at the top: project name, its pages, back to Rossimax */
.hy-bar { border-bottom: 1px solid var(--line); }
.hy-bar .hy-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 14px; padding-bottom: 14px; }
.hy-brand { display: inline-flex; align-items: center; gap: 10px; font: 600 1.2rem Georgia, "Times New Roman", serif; color: var(--text); text-decoration: none; }
.hy-brand svg { width: 28px; height: 28px; flex: none; }
.hy-bar nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: auto; font-size: 0.95rem; }
.hy-bar nav a { color: var(--text); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.hy-bar nav a:hover, .hy-bar nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.hy-by { color: var(--muted); font-size: 0.9rem; }

.hy-hero { padding: 48px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.hy-lead { color: var(--muted); font-size: 1.1rem; margin: 0; }

.hy-toc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; }
.hy-toc ol { margin: 0; padding-left: 20px; columns: 2 220px; }

.hy-text > :first-child { margin-top: 0; }
.hy-text { margin: 12px 0; }
.hy-text ol, .hy-text ul { padding-left: 22px; }
.hy-text li + li { margin-top: 4px; }

.hy-table { overflow-x: auto; margin-top: 12px; margin-bottom: 12px; }
.hy-table table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.hy-table th, .hy-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.hy-table th { color: var(--muted); font-weight: 600; }

.hy-figures { margin-top: 20px; margin-bottom: 20px; }
.hy-figures.is-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.hy-figures figure { margin: 0 0 20px; }
.hy-figures.is-grid figure { margin: 0; }
.hy-figures img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.hy-figures figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }

.hy-note { background: var(--surface); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; max-width: 70ch; }

.hy-faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.hy-faq summary { cursor: pointer; font-weight: 600; }
.hy-answer { margin: 8px 0 0; }
.hy-answer > p:first-child { margin-top: 0; }

/* Support form (module hy-support-form, sent by assets/form.js) */
.hy-form { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin: 8px 0 24px; }
.hy-form .hy-field { margin: 0 0 16px; max-width: none; }
.hy-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.hy-form .hy-hint { display: block; color: var(--muted); font-size: 0.9rem; font-weight: 400; }
.hy-form input, .hy-form select, .hy-form textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
.hy-form input:focus, .hy-form select:focus, .hy-form textarea:focus { border-color: var(--accent); }
.hy-form .hy-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.hy-form .hy-small { color: var(--muted); font-size: 0.9rem; }
.hy-button {
  display: inline-block; font: 600 1rem system-ui, sans-serif; color: var(--surface); background: var(--accent); border: 0; border-radius: 999px;
  padding: 12px 26px; cursor: pointer; text-decoration: none;
}
.hy-button:hover { filter: brightness(1.08); }
.hy-button[disabled] { opacity: 0.6; cursor: wait; }
.bc-form-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.bc-form-status { margin: 16px 0 0; font-weight: 600; }
.bc-form-status:empty { display: none; }
.bc-form-status.is-ok { color: var(--ok); }
.bc-form-status.is-error { color: var(--error); }

.hy-footer { margin-top: 64px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.hy-footer .hy-wrap { display: flex; flex-wrap: wrap; gap: 6px 20px; padding-top: 20px; padding-bottom: 48px; }
.hy-footer a { color: var(--muted); }

@media (max-width: 600px) {
  h1 { font-size: 1.9rem; }
  .hy-hero { padding-top: 32px; }
  .hy-bar nav { margin-left: 0; width: 100%; }
}
.hy-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hy-form input[type="file"] { padding: 8px; cursor: pointer; }
.hy-form input[type="file"]::file-selector-button { font: inherit; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin-right: 12px; cursor: pointer; }
.hy-form .hy-field > .hy-hint { margin-top: 6px; }
.hy-form input:not([type="file"]), .hy-form select { height: 48px; }
