/*
   default-link.css

   Copyleft 🄯 2021 Taiji Yamada <taiji@aihara.co.jp>

   description: see default-links.css
*/
/*
   1) links outside domain:		external link	^https:// etc.
   2) links to the same domain:		local link	^/
   3) links to the same document tree:	relative link	^. etc.
   4) links to the same page:		self link	^#, ^?
*/
a[href] { text-underline-position: auto; text-underline-offset: 25%; }
a[href]:link, a[href]:visited { text-decoration: none; }
a[href]:hover, a[href]:active { text-decoration: underline solid; }
a[href^='#']:hover, a[href^='#']:active,
a[href^='?']:hover, a[href^='?']:active,
a[href^='.']:hover, a[href^='.']:active,
a[href^='/']:hover, a[href^='/']:active {
  text-decoration: underline dotted CanvasText;
}
a:not([href*='://']):hover, a:not([href*='://']):active {
  text-decoration: underline dotted CanvasText;
}
@media (prefers-color-scheme: light) {
a[href]:hover, a[href]:active {
  text-decoration-color: var(--foreground-color, #222);
}
}
@media (prefers-color-scheme: dark) {
a[href]:hover, a[href]:active {
  text-decoration-color: var(--foreground-color, #ddd);
}
}
/*
   These are treated the same as internal links as follows.

   これらは以下のように内部リンクであるかのように扱われます。
*/
summary {
  cursor: pointer;
}
summary > span:first-child:not(.default) { text-underline-position: auto; text-underline-offset: 25%; }
summary:hover	> span:first-child:not(.default),
summary:active	> span:first-child:not(.default) {
  text-decoration: underline dotted CanvasText;
}
@media (prefers-color-scheme: light) {
summary:hover	> span:first-child:not(.default),
summary:active	> span:first-child:not(.default) {
  text-decoration-color: var(--foreground-color, #222);
}
}
@media (prefers-color-scheme: dark) {
summary:hover	> span:first-child:not(.default),
summary:active	> span:first-child:not(.default) {
  text-decoration-color: var(--foreground-color, #ddd);
}
}
