/* hicmobile instance — themes P04 "Mango & Indaco" (light, default) and P10 "Grafite & Lime" (dark),
   verified values (brief 23/10/2026 §1). Theme chosen by data-theme on <html>,
   otherwise by the system. */
:root {
  color-scheme: light;
  --paper: #F8F9FB; --surface: #FFFFFF; --tint1: #FDE7D3; --tint2: #E4E5F6;
  --soft1: #F2A65A; --soft2: #9EA2D8; --soft1-ui: #C86A10; --soft1-text: #995612;
  --accent: #3A3E8C; --on-accent: #FFFFFF; --ink: #1E2033; --muted: #62657A;
  --line: #E5E7EF; --field-border: #8488A6; --focus: #3A3E8C;
  --band: #1E2033;            /* header band: the original logo is white + cyan */
  --band-ink: #F2F3EE;
  --radius: 14px;
  --ink-rgb: 30, 32, 51; --amber: #C86A10; --amber-rgb: 200, 106, 16; --paper-rgb: 248, 249, 251; --on-ink: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #15161A; --surface: #1F2026; --tint1: #2A3218; --tint2: #2A2440;
    --soft1: #C6F432; --soft2: #9B87F5; --soft1-ui: #C6F432; --soft1-text: #C6F432;
    --accent: #C6F432; --on-accent: #15161A; --ink: #F2F3EE; --muted: #A3A6AE;
    --line: #2E3038; --field-border: #6A6E7A; --focus: #C6F432;
    --band: #15161A; --band-ink: #F2F3EE;
    --ink-rgb: 242, 243, 238; --amber: #F2A65A; --amber-rgb: 242, 166, 90; --paper-rgb: 21, 22, 26; --on-ink: #15161A;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #15161A; --surface: #1F2026; --tint1: #2A3218; --tint2: #2A2440;
  --soft1: #C6F432; --soft2: #9B87F5; --soft1-ui: #C6F432; --soft1-text: #C6F432;
  --accent: #C6F432; --on-accent: #15161A; --ink: #F2F3EE; --muted: #A3A6AE;
  --line: #2E3038; --field-border: #6A6E7A; --focus: #C6F432;
  --band: #15161A; --band-ink: #F2F3EE;
  --ink-rgb: 242, 243, 238; --amber: #F2A65A; --amber-rgb: 242, 166, 90; --paper-rgb: 21, 22, 26; --on-ink: #15161A;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink); line-height: 1.6; font-size: 17px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* header: dark band with the original logo */
.hm-header { background: var(--band); border-bottom: 1px solid var(--line); }
.hm-header .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hm-brand { display: flex; align-items: center; text-decoration: none; }
.hm-brand img { height: 30px; width: auto; display: block; }
.hm-account { display: flex; align-items: center; gap: 12px; color: var(--band-ink); font-size: 15px; }
.hm-account a, .hm-account .linklike { color: var(--band-ink); }
.hm-balance { font-weight: 600; white-space: nowrap; }
.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.5rem 0.9rem;
  border: 1px solid var(--field-border); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 15px; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle__icon--sun { display: none; }
:root[data-theme="dark"] .theme-toggle__icon--sun { display: inline; }
:root[data-theme="dark"] .theme-toggle__icon--moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__icon--sun { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle__icon--moon { display: none; }
}
@media (max-width: 640px) {
  .theme-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.hm-main { flex: 1; }

/* buttons and fields */
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--field-border); }
.btn-ghost:hover { border-color: var(--accent); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--field-border); border-radius: 10px; padding: 10px 12px; }
.notice { padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); margin: 16px 0; }

/* footer: only what HicMobile's own homepage states */
.hm-footer { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.hm-footer .wrap { padding-top: 22px; padding-bottom: 26px; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; text-align: center; }

@media (max-width: 600px) { body { font-size: 16px; } .wrap { padding: 0 16px; } }

/* pages (F2) */
h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.02em; margin: 28px 0 12px; }
h2 { font-size: 22px; letter-spacing: -.01em; margin: 28px 0 12px; }
.hm-muted { color: var(--muted); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--surface); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; }
.hm-hero { background: linear-gradient(135deg, var(--tint2) 0%, var(--paper) 50%, var(--tint1) 100%); padding: 64px 0 72px; }
.hm-hero h1 { margin-top: 16px; }
.hm-login { display: grid; grid-template-columns: 1fr minmax(300px, 400px); gap: 48px; align-items: center; }
.hm-narrow { max-width: 720px; padding-bottom: 48px; }
.hm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.hm-form { display: flex; flex-direction: column; gap: 6px; }
.hm-form label { font-size: 14px; font-weight: 600; margin-top: 8px; }
.hm-form .btn { margin-top: 16px; align-self: flex-start; }
.hm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
.hm-grid2 > div { display: flex; flex-direction: column; gap: 6px; }
.hm-grid2 .span2 { grid-column: 1 / -1; }
.hm-error { color: var(--ink); background: var(--tint1); border-left: 4px solid var(--soft1-ui); padding: 10px 14px; border-radius: 8px; margin: 0 0 8px; }
.hm-ok { color: var(--ink); background: var(--tint2); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 8px; }
.hm-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; align-items: center; }
.hm-subnav { display: flex; gap: 20px; margin: 24px 0 0; font-size: 15px; }
.hm-table-wrap { overflow-x: auto; }
.hm-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; }
.hm-table th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px; border-bottom: 1px solid var(--field-border); }
.hm-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.hm-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.hm-tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--tint2); color: var(--ink); }
.hm-state.on { color: var(--ink); } .hm-state.off { color: var(--muted); }
.hm-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 12px 0 8px; }
.hm-dl dt { color: var(--muted); }
.hm-dl dd { margin: 0; }
.hm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 12px; }
.hm-actions h2 { margin-top: 0; }
.hm-password .hm-pw { font-size: 28px; margin: 8px 0 0; letter-spacing: .04em; }
.hm-inline { display: inline-flex; gap: 8px; align-items: center; justify-content: flex-end; }
.hm-inline input { width: 110px; text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 760px) {
  .hm-login, .hm-actions, .hm-grid2 { grid-template-columns: 1fr; }
}

/* home (F3): "I miei segnali" + the journey in four stages, joined by a winding line */
.hm-hero--home { padding: 52px 0 40px; }
.hm-lead { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0; }
.hm-steps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hm-step { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.hm-step:hover { border-color: var(--accent); }
.hm-step.is-suggested { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.hm-step__n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 700; }
.hm-small { font-size: 14px; }
.hm-kicker { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

.hm-signals { padding-top: 8px; }
.hm-signals__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.hm-signals__head a { font-size: 15px; }
.hm-signals__grid { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 16px; }
.hm-balance-big { font-size: 40px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.hm-balance-big span { font-size: 18px; font-weight: 600; color: var(--muted); }
.hm-balance-card p { margin: 10px 0 0; }
.hm-recent__list { list-style: none; margin: 0; padding: 0; }
.hm-recent__list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.hm-recent__list li:last-child { border-bottom: 0; }
.hm-recent__list a { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-recent__list a:hover { color: var(--accent); text-decoration: underline; }
.hm-recent__list .hm-small { white-space: nowrap; }
.hm-recent p { margin: 0; }
.hm-next__name { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; }
.hm-next p { margin: 6px 0 16px; }

.hm-journey { padding-top: 40px; padding-bottom: 64px; }
.hm-stage { display: grid; grid-template-columns: 6% 1fr; gap: 0 20px; align-items: start; }
.hm-stage--right { grid-template-columns: 1fr 6%; }
.hm-stage--right .hm-stage__marker { order: 2; }
.hm-stage--right .hm-stage__body { order: 1; }
.hm-stage__marker { justify-self: center; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--surface); border: 3px solid var(--soft2); color: var(--ink); font-size: 22px; font-weight: 700; position: relative; z-index: 1; }
.hm-stage.is-suggested .hm-stage__marker { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hm-stage__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 6px 0 14px; }
.hm-stage__head h2 { margin: 0; font-size: 28px; }
.hm-stage__q { margin: 0; color: var(--muted); font-size: 18px; }
.hm-badge { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.hm-bend { display: block; width: 100%; height: 90px; margin: -6px 0; overflow: visible; }
.hm-bend path { fill: none; stroke: var(--soft2); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; vector-effect: non-scaling-stroke; }

.hm-services { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hm-services--one { grid-template-columns: 1fr; }
.hm-service { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.hm-service:hover { border-color: var(--accent); transform: translateY(-1px); }
.hm-service h3 { margin: 0 0 6px; font-size: 19px; }
.hm-service p { margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.5; flex: 1; }
.hm-service__foot { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; }
.hm-price { color: var(--soft1-text); }
.hm-go { color: var(--accent); }
.hm-services--one .hm-service { border-left: 4px solid var(--soft1-ui); }

@media (max-width: 900px) {
  .hm-signals__grid { grid-template-columns: 1fr 1fr; }
  .hm-recent { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 760px) {
  .hm-signals__grid { grid-template-columns: 1fr; }
  .hm-stage, .hm-stage--right { grid-template-columns: 44px 1fr; gap: 0 14px; }
  .hm-stage--right .hm-stage__marker { order: 0; }
  .hm-stage--right .hm-stage__body { order: 0; }
  .hm-stage__marker { width: 44px; height: 44px; font-size: 18px; }
  .hm-bend { display: none; }
  .hm-stage + .hm-stage, .hm-bend + .hm-stage { margin-top: 28px; }
  .hm-services { grid-template-columns: 1fr; }
  .hm-stage__head h2 { font-size: 24px; }
}

/* service pages (F4): the shared service stylesheet, in this site's colours. Its own palette variables
   (--ink, --paper, --amber) are redefined here, after it; everything is scoped to .hm-svc */
.hm-svc { max-width: 760px; }
.hm-back { display: inline-block; margin-bottom: 14px; font-size: 15px; color: var(--accent); }
.hm-svc .brand-form input[type="radio"] { width: auto; }
.hm-svc .brand-news-item { padding-left: 1rem; padding-right: 1rem; }
.hm-svc .brand-news-mark { min-width: 0; }
@media (max-width: 520px) {
  .hm-header .wrap { gap: 10px; padding: 0 12px; }
  .hm-brand img { height: 22px; }
  .hm-account { gap: 10px; font-size: 14px; }
  .hm-svc .brand-news-item { flex-wrap: wrap; }
  .hm-svc .brand-news-body { flex: 1 1 220px; min-width: 0; }
}
.hm-svc .rc-summary .admin-table-wrap { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; position: static; left: auto; transform: none; }
.hm-svc .rc-summary .admin-table { width: 100%; }
.hm-svc .bt-last12 td:first-child, .hm-print .bt-last12 td:first-child { white-space: nowrap; }

/* charts stored as SVG keep the shared site's own colours (dark teal on light): in the dark theme they sit on
   a light panel so axes and labels stay readable; legend dots take the bars' real colour */
.hm-svc .bt-legend-organic { background: #14494F; }
:root[data-theme="dark"] .hm-svc :is(.bt-chart, .sk-overlap-wrap, .sk-intent-mix-wrap, .sa-chart-wrap, .sr-chart, .al-chart, figure) > svg,
:root[data-theme="dark"] .hm-svc .sk-table svg { background: #F8F9FB; border-radius: 8px; }
:root[data-theme="dark"] .hm-svc :is(.bt-chart, .sk-overlap-wrap, .sk-intent-mix-wrap, .sa-chart-wrap) { background: #F8F9FB; border-radius: 10px; padding: 8px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hm-svc :is(.bt-chart, .sk-overlap-wrap, .sk-intent-mix-wrap, .sa-chart-wrap) { background: #F8F9FB; border-radius: 10px; padding: 8px; }
  :root:not([data-theme="light"]) .hm-svc :is(.sr-chart, figure) > svg, :root:not([data-theme="light"]) .hm-svc .sk-table svg { background: #F8F9FB; border-radius: 8px; }
}
