:root {
  color-scheme: light;
  --ink: #142742;
  --muted: #4d6078;
  --line: #dce5ee;
  --paper: #f4f8fc;
  --navy: #112947;
  --blue: #205eb4;
  --ice: #d3e8ff;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

a { color: #1856a4; text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #6aaaff;
  outline-offset: 3px;
}
.frame { max-width: 1210px; padding-right: 1.5rem; padding-left: 1.5rem; }
.skip { position: fixed; top: .6rem; left: .6rem; padding: .5rem 1rem; background: #fff; z-index: 2; transform: translateY(-150%); }
.skip:focus { transform: none; }
.site-header { background: #fff; border-bottom: 1px solid #e4ebf1; }
.header-row { min-height: 84px; display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; }
.brand, .footer-brand { color: var(--ink); text-decoration: none; font-weight: 750; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-size: 1.19rem; line-height: 1.14; }
.brand-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; background: var(--navy); color: #b7dcff; font-size: 1.15rem; }
.brand small { display: block; margin-top: .29rem; font-size: .68rem; font-weight: 700; letter-spacing: .095em; color: #52657c; }
.site-nav, .footer-row nav { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem 1.65rem; }
.site-nav a, .footer-row nav a { color: var(--ink); text-decoration: none; font-weight: 650; line-height: 1.25; font-size: .94rem; }
.site-nav a:hover, .footer-row a:hover, .tile:hover h3 { text-decoration: underline; }
.hero { color: #fff; background: radial-gradient(ellipse at 82% 30%, #214978 0%, #153351 33%, #112644 72%); }
.hero-grid { min-height: 468px; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, .88fr); align-items: center; gap: clamp(2.25rem, 7vw, 6.2rem); padding-top: 3.7rem; padding-bottom: 4rem; }
.example-label { font-size: .77rem; font-weight: 750; letter-spacing: .115em; }
h1, h2, h3 { margin-top: 0; line-height: 1.15; font-weight: 730; letter-spacing: -.027em; }
.hero h1 { font-size: clamp(2.55rem, 5.5vw, 4rem); line-height: 1.03; margin: 0 0 1.15rem; max-width: 20ch; }
.hero-copy { color: #e2ebf8; font-size: 1.13rem; margin: 0 0 1.6rem; max-width: 42ch; line-height: 1.52; }
.search-form { max-width: 710px; }
.search-control { display: flex; align-items: stretch; gap: .5rem; padding: .38rem; background: #fff; border: 1px solid #b8c7d9; border-radius: 12px; }
.search-control input { border: 0; min-width: 0; flex: 1 1 0; width: 100%; padding: .62rem .7rem; border-radius: 7px; background: #fff; color: var(--ink); font: inherit; }
.search-control input::placeholder { color: #56677b; opacity: 1; }
.action, .secondary { background: var(--blue); color: #fff; padding: .65rem 1.12rem; font-weight: 720; border-radius: 8px; border: 1px solid transparent; white-space: nowrap; }
.action:hover, .action:active { background: #124b95; color: #fff; }
.hero .action { background: #93c7fc; color: #0b2549; min-width: 88px; }
.hero .action:hover { background: #c2e1ff; }
.hero-examples { font-size: .9rem; color: #cedbef; margin: .75rem 0 0; }
.hero-examples a { color: #deedff; font-weight: 680; }
.example-card { padding: 1.65rem 1.7rem; border: 1px solid #6381a3; background: #153251; border-radius: 18px; box-shadow: 0 20px 48px #061b3660; transform: translateY(8px); }
.example-label { display: block; margin: 0 0 .8rem; color: #c1d9f4; }
.example-name { font-size: 1.28rem; font-weight: 700; margin: 0 0 .75rem; }
.example-code { display: inline-block; font: 750 clamp(1.75rem, 3vw, 2.4rem)/1.1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .11em; color: #ddedff; background: #244a70; border-radius: 9px; padding: .52rem .8rem .48rem; }
.example-office { margin: .8rem 0 .75rem; color: #d9e8f8; }
.example-card a { color: #d8ecff; font-weight: 680; }
.facts { background: #edf4fb; border-bottom: 1px solid #dee9f4; }
.facts-row { min-height: 72px; display: flex; flex-wrap: wrap; align-items: center; gap: .55rem clamp(1.15rem, 3.2vw, 3rem); padding-top: .85rem; padding-bottom: .85rem; color: #425a75; }
.facts-row strong { font-size: 1.28rem; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: .15rem; }
.facts-row a { margin-left: auto; font-weight: 650; font-size: .91rem; }
.tools { padding-top: 3.1rem; padding-bottom: 3.2rem; }
.tools h2 { font-size: clamp(1.65rem, 2.9vw, 2.1rem); margin-bottom: 1.3rem; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.tile { color: var(--ink); display: flex; flex-direction: column; text-decoration: none; padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.tile:hover { border-color: #91afd0; background: #f9fcff; }
.tile-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #e6f1fe; color: #1c559c; font-size: 1.32rem; font-weight: 750; margin-bottom: .8rem; }
.tile h3 { margin-bottom: .45rem; font-size: 1.24rem; }
.tile p { color: var(--muted); margin: 0; font-size: .96rem; }
.secondary { background: #fff; color: #174f91; border-color: #8ba8c7; }
.secondary:hover { background: #dcecff; color: #123f76; }
.site-footer { background: #fff; border-top: 1px solid #dfe9f3; }
.footer-row { min-height: 113px; display: flex; gap: 1rem 2rem; flex-wrap: wrap; padding-top: 1.35rem; padding-bottom: 1.35rem; align-items: center; justify-content: space-between; }
.footer-brand span, .footer-row p { color: var(--muted); }
.footer-row p { margin: .22rem 0 0; font-size: .91rem; }
.crumb { max-width: 1210px; margin: 0 auto; padding: 1.25rem 1.5rem 0; font-size: .9rem; }
.crumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .55rem; list-style: none; margin: 0; padding: 0; }
.crumb li + li::before { content: "/"; margin-right: .55rem; color: #61768e; }
.inner { padding-top: 2.05rem; padding-bottom: 4.6rem; min-height: 52vh; }
.inner-intro { margin: 0 0 1.8rem; }
.inner h1 { font-size: clamp(2rem, 5vw, 3.3rem); margin-bottom: .75rem; max-width: 34ch; }
.inner h2 { font-size: 1.55rem; margin: 1.65rem 0 .75rem; }
.inner h3 { font-size: 1.15rem; margin: .95rem 0 .65rem; }
.lede { color: var(--muted); font-size: 1.12rem; max-width: 72ch; margin-bottom: 1.1rem; }
.entries { list-style: none; padding: 0; margin: 0 0 1.2rem; max-width: 900px; border: 1px solid var(--line); border-radius: 12px; }
.entries li + li { border-top: 1px solid var(--line); }
.entries a { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; padding: .75rem .98rem; text-decoration: none; }
.entries a:hover strong { text-decoration: underline; }
.entries span { color: var(--muted); }
.details { display: flex; flex-wrap: wrap; gap: .7rem 2rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); max-width: max-content; }
.details dt { font-size: .86rem; color: var(--muted); }
.details dd { margin: .1rem 0 0; font-weight: 700; }
.mono { font-family: ui-monospace, Consolas, monospace; font-weight: 700; }
.notice, .support { max-width: 76ch; padding: .75rem .9rem; background: var(--paper); border-left: 3px solid #87add8; margin-top: 1.2rem; }
.notice h2 { margin-top: .2rem; }
.support { color: #415770; font-size: .95rem; }
.reading { max-width: 78ch; }
.preserve { white-space: pre-line; }
.table { max-width: 900px; }
.table thead th { background: var(--paper); }
.crosswalk { max-width: 580px; display: grid; gap: .45rem; }
.crosswalk label { font-weight: 700; }
.crosswalk select { padding: .6rem; border: 1px solid #b8c7d9; border-radius: 8px; background: #fff; color: var(--ink); }
.pagination-nav { display: flex; gap: 1rem; }

.home-editorial { padding: 3.45rem 0 4rem; background: var(--paper); border-top: 1px solid var(--line); }
.editorial-page { padding-top: 2.15rem; padding-bottom: 4.5rem; }
.section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem 1.5rem; margin-bottom: 1.3rem; }
.section-heading h2 { font-size: clamp(1.65rem, 2.9vw, 2.1rem); margin: 0; }
.section-heading p { color: var(--muted); margin: .28rem 0 0; }
.section-heading > a { font-weight: 670; }
.blog-heading { margin-bottom: 1.6rem; }
.blog-heading h1 { font-size: clamp(2.15rem, 5vw, 3.65rem); max-width: 24ch; line-height: 1.06; margin: 0 0 .65rem; }
.blog-heading p { font-size: 1.14rem; color: var(--muted); max-width: 66ch; margin: 0; }
.topic-nav { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.75rem; }
.topic-nav a { display: inline-block; padding: .48rem .88rem; border: 1px solid #b9ccdf; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 670; font-size: .91rem; text-decoration: none; }
.topic-nav a:hover { background: #ebf3fc; }
.topic-nav a[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }
.lead-story { background: var(--navy); border-radius: 17px; }
.lead-story > a { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); color: #fff; text-decoration: none; border-radius: inherit; }
.lead-story-copy { padding: clamp(1.4rem, 4.2vw, 3.2rem); }
.lead-story h2, .lead-story h3 { font-size: clamp(1.62rem, 3.5vw, 2.65rem); max-width: 22ch; margin: .75rem 0 .68rem; }
.lead-story p { color: #d5e4f6; max-width: 43ch; margin: 0 0 1.1rem; }
.lead-story img { width: 100%; height: 100%; max-height: 440px; object-fit: cover; object-position: center; border-radius: 0 17px 17px 0; }
.lead-story a:hover h2, .lead-story a:hover h3, .story-card a:hover h3 { text-decoration: underline; text-underline-offset: .14em; }
.article-topic { display: inline-block; width: fit-content; padding: .25rem .6rem; border-radius: 5px; font-size: .84rem; line-height: 1.35; font-weight: 720; }
.topic-fatturazione-pa { background: #e1eeff; color: #1c4e8c; }
.topic-sdi { background: #edf0f9; color: #434977; }
.topic-ateco { background: #e0f3ed; color: #215c50; }
.story-meta { display: flex; gap: .2rem 1rem; flex-wrap: wrap; align-items: baseline; color: var(--muted); font-size: .88rem; }
.lead-story .story-meta { color: #ccdef3; }
.story-cta { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.home-story-grid { margin-top: 1rem; }
.story-card { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.story-card a { display: flex; flex-direction: column; align-items: flex-start; height: 100%; padding: 1.16rem 1.24rem; color: var(--ink); text-decoration: none; border-radius: inherit; }
.story-card:hover { border-color: #91afd0; }
.story-card h3 { margin: .66rem 0 .46rem; font-size: clamp(1.09rem, 2vw, 1.25rem); line-height: 1.22; }
.story-card p { margin: 0 0 .85rem; color: var(--muted); line-height: 1.55; }
.story-card .story-meta { margin-top: auto; }
.blog-articles { margin-top: 2.25rem; }
.article-heading { max-width: 900px; }
.article-heading h1 { margin-top: .6rem; max-width: 29ch; }
.article-heading .story-meta { margin-top: .7rem; }
.topic-access { text-decoration: none; }
.topic-access:hover { text-decoration: underline; }
.article-cover { display: block; width: 100%; height: auto; max-height: 435px; object-fit: cover; border-radius: 15px; margin: 1.45rem 0 2rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 2.12fr) minmax(0, .86fr); align-items: start; gap: clamp(1.5rem, 5vw, 3.8rem); }
.blog-reading { min-width: 0; font-size: 1.05rem; line-height: 1.72; }
.blog-reading h2 { margin: 1.55rem 0 .65rem; font-size: clamp(1.34rem, 2.2vw, 1.75rem); }
.blog-reading code { overflow-wrap: anywhere; }
.article-sources { border-top: 1px solid var(--line); margin-top: 1.65rem; padding-top: .7rem; }
.article-sources ul { padding-left: 1.3rem; }
.article-sources li { margin-bottom: .22rem; overflow-wrap: anywhere; }
.article-tool { border: 1px solid var(--line); border-radius: 13px; background: var(--paper); padding: 1.3rem; }
.article-tool h2 { font-size: 1.2rem; margin-bottom: .45rem; }
.article-tool p { color: var(--muted); margin-bottom: .6rem; }
.article-tool a { font-weight: 670; }
.related-stories { margin-top: 2.4rem; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.related-story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.sdi-shortcuts { margin: -1rem 0 1.2rem; }
.sdi-list { margin-top: 2rem; }
.inner .sdi-list h2 { margin: 0; }
.sdi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: .85rem; }
.sdi-card { min-width: 0; padding: 1.1rem 1.14rem; border: 1px solid var(--line); border-radius: 12px; scroll-margin-top: 1rem; }
.sdi-card:target { border-color: #3077c8; outline: 2px solid #bdd9fb; background: var(--paper); }
.sdi-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem .6rem; margin-bottom: .55rem; }
.inner .sdi-card h3 { margin: 0; }
.sdi-card-head a { display: inline-block; padding: .2rem .5rem; border-radius: 6px; background: #e8f2ff; color: #1856a4; }
.sdi-card-head code { font-size: 1em; letter-spacing: .04em; color: inherit; }
.sdi-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.sdi-card .sdi-platform { margin-bottom: .27rem; color: var(--ink); font-weight: 730; }
.sdi-status { padding: .2rem .47rem; border-radius: 6px; font-size: .81rem; line-height: 1.25; font-weight: 675; }
.sdi-documented { background: #e4f3ee; color: #23584b; }
.sdi-cataloged { background: #eef2f7; color: #425973; }
.sdi-pending, .sdi-historical { background: #f9eedc; color: #724700; }

@media (max-width: 1080px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .hero-grid { min-height: 0; grid-template-columns: 1fr minmax(190px, .58fr); gap: 1.3rem; }
  .hero h1 { font-size: clamp(2.25rem, 6vw, 3.3rem); }
  .example-card { padding: 1.15rem; }
  .site-nav { gap: .5rem 1rem; }
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .frame, .crumb { padding-right: 1rem; padding-left: 1rem; }
  .header-row { display: grid; gap: .65rem; padding-top: .85rem; padding-bottom: .85rem; }
  .site-nav { column-gap: 1rem; row-gap: .6rem; }
  .site-nav a { font-size: .88rem; }
  .hero-grid { display: block; padding-top: 2.4rem; padding-bottom: 2.4rem; }
  .hero h1 { font-size: clamp(2.45rem, 11vw, 3.3rem); }
  .hero-copy { font-size: 1.04rem; }
  .example-card { margin-top: 1.45rem; transform: none; }
  .example-code { font-size: 1.66rem; }
  .facts-row a { margin-left: 0; }
  .tools { padding-top: 2.2rem; padding-bottom: 2.2rem; }
  .tiles { grid-template-columns: 1fr; gap: .7rem; }
  .inner { padding-top: 1.6rem; }
  .home-editorial, .editorial-page { padding-top: 2.1rem; padding-bottom: 2.65rem; }
  .lead-story > a { grid-template-columns: minmax(0, 1fr); }
  .lead-story img { grid-row: 1; height: auto; aspect-ratio: 1200 / 630; border-radius: 17px 17px 0 0; }
  .story-grid, .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-cover { margin: 1.2rem 0 1.5rem; }
}
